Python Programming - Console Input/Output - Discussion

Discussion Forum : Console Input/Output - General Questions (Q.No. 46)
46.
How can you prompt the user for a yes/no response?
response = input("Yes or no? (y/n): ")
response = prompt_yes_no()
response = get_response(["yes", "no"])
response = input_yes_no()
Answer: Option
Explanation:
To prompt the user for a yes/no response, use input("Yes or no? (y/n): ").
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.