Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
8 lines (8 loc) · 424 Bytes

File metadata and controls

8 lines (8 loc) · 424 Bytes
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
prompt = '\nTell me something, and I will repeat it back to you: '
prompt += '\nEnter "q" or "Q" to end the program. '
message = ' '#没有可供比较的值时程序无法运行,因此需要给message赋一个初值,
#且这个初值是空格,符合执行while循环的条件
while message != 'q' and message != 'Q':
message = input(prompt)
if message != 'q' and message != 'Q':
print('\n' + message)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.