Toggle navigation
HUSTOJ
F.A.Qs
ProblemSet
Source/Category
Status
Ranklist
Contest
Login
Language
中文
ئۇيغۇرچە
English
فارسی
ไทย
한국어
Problem2248--while循环--输入密码程序
2248: while循环--输入密码程序
[Creator :
]
Time Limit :
1.000
sec
Memory Limit :
128 MB
Solved: 36
Submit: 96
Statistics
Description
编程实现:用户输入密码,密码错误,则输出
"
error,input again:"
,用户再次输入密码,直到密码输入正确,则输出
"good"
。正确密码设置为
"abc"。
补充以下程序。
#guess_password.py
password=input()
while ①
print('error,input again:')
②
print('good')
Input
mnh
iuy
abc
Output
error,input again:
error,input again:
good
Sample Input
Copy
abc
Sample Output
Copy
good
Source/Category