Answer to Question #256083 in Python for Gugu

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.
1
Expert's answer
2021-10-25T03:02:14-0400
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!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS