How can i make it with python the three condition together !!! | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
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 ('...')

29th Nov 2020, 4:31 PM
Med Amine
Med Amine - avatar
3 ответов
+ 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/
29th Nov 2020, 4:43 PM
Ipang
+ 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!
29th Nov 2020, 4:35 PM
Simba
Simba - avatar
+ 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:
30th Nov 2020, 1:20 AM
David Ashton
David Ashton - avatar