Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

Administrator / lesson7_7

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 0
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Snippets
  • Members
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Commit 73822f3e authored 2 years ago by BellCodeEditor's avatar BellCodeEditor
Browse files
Options
  • Browse Files
  • Download
  • Email Patches
  • Plain Diff

save project

parent a6652302
Show whitespace changes
Inline Side-by-side
Showing with 7 additions and 1 deletions
  • lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll.py
lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll.py
View file @ 73822f3e
...@@ -2,9 +2,15 @@ def new_input(): ...@@ -2,9 +2,15 @@ def new_input():
tota=[] tota=[]
while True: while True:
a=input("请输入:,q退出") a=input("请输入:,q退出")
if a==q: if a=="q":
break break
else: else:
try:
a=int(a)
except:
print("要输入整数啊")
else:
tota.append(a) tota.append(a)
print(tota) print(tota)
new_input() new_input()
This diff is collapsed. Click to expand it.
  • Write
  • Preview
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment