Question: Can someone help me with my python code? I want the code to exit the loop if the user enters a c or s. If
Can someone help me with my python code? I want the code to exit the loop if the user enters a c or s. If the user enters an invalid character, an error message will be displayed and it will ask the user to enter another character until it is a c or s. Thank you
type = str(input("Enter the type of account [C/S]: ")) while (type != 'C' or type != 'S'): print("Enter C or S") type = str(input("Enter the type of account [C/S]: ")) print("Yay!")
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
