0
How can i make it with python the three condition together !!!
A=5 B=6 C=8 If A , B and C > 4 Print ('...') Else : Print ('...')
3 Réponses
+ 5
Alternatively, you can also use `all` function
A = 5
B = 6
C = 8
if all( number > 4 for number in ( A, B, C ) ):
print( "A, B and C are greater than 4" )
else:
print( "Some number were less or equal to 4" )
From here 👇
https://www.sololearn.com/learn/JUMP_LINK__&&__Python__&&__JUMP_LINK/2456/
+ 12
#Try this
A=5
B=6
C=8
if A>4 and B>4 and C > 4:
print ('Yes')
else :
print ('No')
Edit:
David Ashton Sir Thank you!
+ 4
Simba
if a and b and c > 4:
means
if a!=0 and b!=0 and c > 4:
(try it out)
The statement needs to be
if a > 4 and b > 4 and c > 4: