if (crowd > 500) == True:
return "Crowded"
elif (crowd < 5) == True:
return "Empty"
else:
return "Okay"
Answers
Answered by
3
Answer:
Exactly what you need can you clear it
Answered by
0
The message displayed by this snippet is shown below.
In this snippet of code, we see that 'crowd' is a variable.
This variable can store values lesser than 5, greater than 500 or values which fall in between this range.
If the value stored in crowd is more than 500, then the message "Crowded" is printed.
If the value stored in crowd is less than 5, then the message "Empty" is printed.
Else, for any value not lying within this range, the message "Okay"is displayed.
Similar questions