Join 36000+ teachers and students using TTIO.
It helps to think of the three of them like this:
Each kind of statement is indented in the same way - with 4 spaces. Here’s an example of each:
if x == 5: print("x is 5!")
if x == "Penny": print("Your name is Penny!") else: print("Looks like your name isn't Penny!")
if age == 50: print("You're really old!") elif age == 20: print("You're kind of young!") elif age == 10: print("You're a kid!") else: print("I wonder how old you are?")
www.teachyourselfpython.com