Question #256083

A student would like to select a suitable T-shirt from local shops. The colour could be red, blue or white, the size needs to be medium and the shop must be no more than 10 miles away. Write a python program for the given scenario.

Expert's answer

c=int(input("Select a color: \n1. red \n2. blue \n3. white\n"))
size=int(input("Select a size: \n1. small \n2. medium \n3. large\n"))


distance=int(input("Enter distance: "))


if ((c==1 or c==2 or c==3) and (size==2) and (distance==10)):
    print("The requirements are met")
else:
    print("The requireents are not met")

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS