64.0k views
0 votes
Write an if statement to test if a number stored in y is between 6 and 10 inclusive.

User Arpymastro
by
4.1k points

1 Answer

4 votes

y = choose whatever number you want.

if 5 < y < 11:

print("The value stored in y is between 6 and 10 inclusive")

else:

print("The value stored in y is not between 6 and 10 inclusive.")

I hope this helps!

User Galo
by
4.5k points