0

Can we add multiple conditions in an if statement using python?

If statement

23rd Feb 2020, 1:53 PM
Taraash Mittal
Taraash Mittal - avatar
4 odpowiedzi
+ 4
Like this: x = 3 y = 4 z = 5 if (x == 3 and y == 5 or z == 5): print('succes') So, yes you can.
23rd Feb 2020, 1:57 PM
Paul
Paul - avatar
+ 1
Thanks man
23rd Feb 2020, 2:18 PM
Taraash Mittal
Taraash Mittal - avatar
0
Age = 12 Name = input("What's your name? ") if Age = 13: print("Invalid age!") if Age <11: print("Welcome") elif (Age == 12 or <11): print("Children") else: print("Not Eliegible")
15th Mar 2021, 9:45 PM
Prince Etiet
Prince Etiet - avatar
- 1
YES!
23rd Feb 2020, 2:07 PM
Utkarsh Sharma
Utkarsh Sharma - avatar