Exercise

Why are conditional statements required?

Conditional statements are used to execute code fragments based on a given condition. The most commonly used construct is if-else, with the following syntax:


if [condition]:
  __execution if true__
else:
  __execution if false__

Instructions

100 XP
  • Store the length of squares_list to square_len using function len()
  • Comparision operators <, >, <=, >=, == and != help to check condition is true or false
  • Write the outcome in each branch of the following conditional code