8 Respostas
+ 1
The translation of 5<x<10 in python is 5<x<10
e.g.:
if 5<x<10:
pass
+ 1
Ore, in python there is statement "not" which is used to return True if statement after it is false.
It could be used as follows:
if not (5<=x<=10):
There is also mistake in your question. <= is used for less or equal rather than <
In addition to share code on sololearn, you could either go to your code and press on share button(top-right) and copy link, or if you are typing a message/comment, there is a (plus) button on the right, near (send) button. Press it, and then choose "Insert Code"
+ 1
Use the and operator
x<=5 and x<=10.
0
if 5<x and x<10:
0
It didnt work
0
If it is greater of equal to then it should be:
if x>=5 and x<=10:
0
I’m new to this so i dont know how i’m supposed to share the code
0
Thank you so much
I’ve seen my mistake