Created
March 27, 2024 18:38
-
-
Save makwanadeepam/003f7f7c8e59ea4078aeafe38e4f40bf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# if elif else | |
x=15 | |
if(x>18): # Using circular brackets | |
print("Eligible to vote") | |
elif(x==18): | |
print("Just became eligible to vote") | |
elif x<=5: # Using space | |
print("You're a child") | |
else: | |
print("Not Eligible") | |
# You can omit elif and/or else. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment