Exercise Set 8
Exercise 1 of 4
Write the following as an if statement:
If age is greater than 30, print "Hello sir"
(use two spaces to indent)
Your code
Exercise 2 of 4
Write the following as an if statement:
If total is less than or equal to 12.5, print "Too low"
Your code
Exercise 3 of 4
Write the following as an if statement:
If name is equal to "Lizz", print "Hello Lizz".
Otherwise, print "I don't know you".
Your code
Exercise 4 of 4
Write the following as an if statement:
If x is equal to 0, print "zero".
But if x is greater than 0, print "positive".
Otherwise, print "negative".
Your code