#P0010. Yes or No
Yes or No
1. 问题描述
Check if the user's input is yes/y or no/n.
- If the input is
yesory, printAgree - If the input is
noorn, printDisagree - Print
Invalid inputif the user input anything else - Notice:
- No matter how the user combines uppercases and lowercases, the program should treat them as valid input. (e.g.
YeSorYesare all valid inputs) - The spaces before and after user's input don't affect the result
- No matter how the user combines uppercases and lowercases, the program should treat them as valid input. (e.g.
2. Input & Output
Input:
- A string
- Use
input()as input. Notice that the value you get frominput()is a string
Output:
- A string
- Use
print()for your output
Example
# Input:
yes
# Output:
同意
# Input:
Nope
# Output:
无效输入