Page 55 - Touchcode_C6_Flipbook
P. 55

Coding Task            01                    Experiential Learning



                                                          Are you a teen?
                  Description: In this task, you will learn to draw a flowchart to check if you are a child,
                  teenager or an adult. You will learn to write algorithm, pseudocode and then draw a

                  flowchart of the situation.

                  Algorithm:

                  Step 1:  Input age


                  Step 2:  If age <13

                  Step 3:  Print "You are a Child."

                  Step 4:  else if age > = 13 AND age <=19


                  Step 5:  Print "You are a Teenager."

                  Step 6:  else Print "You are an Adult."


                  Step 7:  End

                  Pseudocode:

                  Program Start


                  IF (age < 13) THEN

                      DISPLAY "You are a Child."

                  ELIF (age >= 13 AND age < 19) THEN


                      DISPLAY  "You are a Teenager."

                  ELSE

                      DISPLAY  "You are an Adult."


                  Program End












                                                                                     Control with Conditionals   53
   50   51   52   53   54   55   56   57   58   59   60