Python | Sololearn: Learn to code for FREE!

0

# Python

Please I need help Using the if statement, is there a way to write that a number is shouldn’t be less than or equal to a number and also greater than or equal to another number The translation of 5<x<10 in python

10/22/2021 9:43:19 PM

Oyetubo Oreoluwa

+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"

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

-1

Use the and operator x<=5 and x<=10.