Page 97 - Computer Genius Class 07
P. 97
Step 2 Drag the if-do block from Logic category, and add three else if and one else to the if-do
block.
Step 3 Add logical and relational blocks in if portion of if-do block, to form the logic for an ‘Acute’
angle.
Add print block, to print "Acute Angle", if the angle is greater than 0 degrees and less than
90 degrees.
Step 4 Add logical and relational loc s in first else i portion o i do loc to orm the logic or
the Right angle. Add print block, to print "Right Angle", if the angle is equal to 90 degrees.
Step 5 Add logical and relational blocks in second else if portion of if-do block, to form the logic
for the Obtuse angle. Add print block, to print "Obtuse Angle", if the angle is greater to 90
degrees and less than 180 degrees.
Step 6 Add logical and relational blocks in third else if portion of if-do block, to form the logic for
the Straight angle. Add print block, to print "Straight Angle", if the angle is equal to 180
degrees.
Step 7 Add add print block in else portion of if-do block, to print "Enter a proper value less than
equals to 180", if the angle is greater than 180 degrees.
Let's REFRESH
l Logical operators in programming are commands that take decisions for a code based on specific
conditions.
l Relational operators are blocks of commands that directs the code based on the relation between two
variables.
l When an angle measures less than 90 degrees, it is called an ‘Acute’ angle.
l When an angle measures equal to 90 degrees, it is called a ‘Right’ angle.
l When an angle measures greater than 90 degrees, it is called an ‘Obtuse’ angle.
Exploring Math with Coding 95

