Cursos
Iniciar sesiónComenzar a aprender IA
Cursos
Iniciar sesiónComenzar a aprender IA
0

what is the reason for below output

print(10 or 56) #10 print(56 or 10) #56 print (5 and 14) #14 print (14 and 5) #5

printandor
30th Mar 2020, 7:50 PM
Rohith Rajan
Rohith Rajan - avatar
1 Respuesta
+ 5
"or" and "and" don't return a boolean as many expect. Check this for complete answer: https://www.sololearn.com/discuss/2123294/?ref=app
30th Mar 2020, 7:57 PM
Kevin ★

¿Tienes a menudo preguntas como esta?

Aprende gratis de forma más eficaz

  • Introducción a Python

    7,1M de estudiantes

  • Introducción a Java

    4,7M de estudiantes

  • Introducción a C

    1,5M de estudiantes

  • Introducción a HTML

    7,5M de estudiantes

Ver todos los cursos
En tendencia hoy
Is anyone else experiencing this Sololearn issue?
0 Votes
Best language?
0 Votes
How do I keep myself motivated in coding
0 Votes
Anyone have song names? Comment your favorites here for a project im working on
1 Votes
Bro can you fix yt error?
0 Votes
I want to know how to make an Payment App like what I need to learn I need some guidance
0 Votes
Learn - multiple choice course questions display in one box making it impossible to continue
1 Votes
Need suggestions to learn AI and ML
1 Votes
Bug in Completing AI Practice
0 Votes
Java full stack
0 Votes