The following if statement determines whether reply is equal to‘Y’ or ‘y’:
-
reply = input(“Y or y to continue: “)
if reply == “Y” and reply == “y”:
print(“Y — <uppercase> has beenselected. “)
else:
print(“y — <lowercase> has beenchosen. “)
print(“… continue running this program …”)
-
Rewrite this statement in python so it onlymakes one comparison and does not use the or operator. (Hint: useeither the upper or lower methods.)
- Write a loop that asks the user “Do you want to repeat theprogram or quit? <R/Q> “. The loop should repeat until theuser has entered an R or Q (either uppercase or lowercase)
Expert
OR
PayPal Gateway not configured
OR
PayPal Gateway not configured
PayPal Gateway not configured
PayPal Gateway not configured