Quick actions

cmd+k|ctrl+k

Navigation

Languages

3. elseif block

Snippet info

Language

Python

Visibility

public

Author

aaron.lung.wai

Created

2022-11-23T14:09:33.981026Z

Updated

2024-04-06T03:30:32.169267Z

#If - elif - else

x = 10

if x > 100:
    print("x is greater than 100")
elif x > 70:
    print("x is greater than 70")
elif x > 60:
    print ("x is greater than 60")
elif x > 50:
    print ("x is greater than 50")
else:
    print("We don't have a clue")
INFO