0
Hello everyone am new to python little help here
x=15 b=15 if x<b: print('ok'); else : print('notok'); #why output (notok) even if value are equal
2 Respostas
+ 2
It outputs "notok" because, well, x isn't less than b, it's equal to b. This causes the program to run the code inside the else statement. To prevent this from happening, try <= instead of <.
+ 1
works thx 😊👍