Private: Code with Blockly
About Lesson

Activity 1: correct the flowchart.
Code to be built: For a given angle, whose value is bigger, sin or tan?

Activity 2: correct the loop in part A
Code to be built: add the elements given in the list.
S= sum, i= position of value in list.

Activity 3: correct the logic in part B
Code to be built: after correcting the loop in part A,, build a logic to return “odd” for odd number and “even” for even numbers

                                                 ANSWERS

Activity 1:
⦁ Mistake: with a single IF statement, the statement “ Tan A is bigger” will be printed in both conditions ,yes or no.
⦁ Fix: add a separate else condition for Tan A.
Activity 2:
⦁ Mistake: Value of i changes from 1→3{ i=1 till i<=3 with i=i+2}
⦁ Fix: build the condition so that value of i changes from       1→2→3→4→5{i=1 till i<=5 and i=i+1}
Activity 3
⦁ Mistake: Odd condition is printed irrespective of result.
⦁ Fix: add a else condition for print “odd” command.


error:
Fill in the form for S’O’A Fablab Orientation 2021.