Chapter 3: Problem 19
Write an if statement that displays the message "The number is not valid" if the value referenced by speed is outside the range 0 through 200 .
Short Answer
Expert verified
Question: Write an if statement to check if the variable "speed" is outside the range of 0 to 200 and display the message "The number is not valid" if it is.
Answer:
```python
if speed < 0 or speed > 200:
print("The number is not valid")
```