Inactive Tutor answered 02/03/21
Assuming you want a way to control user input to be only A, B, or C and only uppercase. You could write it in a loop like so:
Bart H.
asked 02/01/21I need help with this sample output line and how to code it thank you and only using capital letters no lowercase and no numbers.
User Input
Enter your plan letter (A, B, or C):
Inactive Tutor answered 02/03/21
Assuming you want a way to control user input to be only A, B, or C and only uppercase. You could write it in a loop like so:
Inactive Tutor answered 02/01/21
charStrPlan = "?"
while (charStrPlan!="A") and (charStrPlan!="B") and (charStrPlan!="C"):
charStrPlan = input("Please input your plan letter (A,B, or C) :> ")
charStrPlan = charStrPlan.upper()
print(charStrPlan)
Get a free answer to a quick problem.
Most questions answered within 4 hours.
Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.