I am wondering about this if I had a program that contained this:
if (0 <= X and X < 49)
output "you fail"
What will be printed if the input is 0? would it say you fail? I was thinking it was worded wrong and it should read:if (0 <= X or X < 49)
output "you fail"
twgood
0
Light Poster
Recommended Answers
Jump to Post
if (0 <= x && x < 49)
can also be written asif (x >= 0 && x < 49)
Now what would you think will happen if x == 0 ?
All 4 Replies
Nick Evan
4,005
Industrious Poster
Team Colleague
Featured Poster
twgood
0
Light Poster
Nick Evan
4,005
Industrious Poster
Team Colleague
Featured Poster
twgood
0
Light Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.