Before you start this course, you must login to Replit

If you have forgotten your Replit account user name or password, ask your Coder Coach.




Adapt the code to:

  • Add a line of code asking the user to enter a third number
  • Add IF/ELIF/ELSE statements to confirm whether the third number is bigger/smaller/the same as the first number and whether it is bigger/smaller/the same as the second number

Learning Objectives/Goals

Be able to read, comprehend, trace, adapt and create Python code using selection that:

  • Uses Boolean conditions
  • Uses selection using IF, ELIF and ELSE for more than two situations

Task Modify

Your task is to change the starter code and add code in to conform to the instructions in

Help! My Code Does Not Work!

Make sure that you check for the following things:

  • selection begins with ‘if’ has as many ‘elif’s in the middle as you need and end with ‘else’
  • a colon at the end of each if and else line.
  • each branch is indented unsing the TAB key (not just spaces)
  • if, elif & else aren’t indented
  • a condition after each ‘if’ and ‘elif’
  • no condition after ‘else’
  • a double equals in the condition when chcking that two pieces of data are the same.