Skip to content

Instantly share code, notes, and snippets.

@fbigun
Last active August 29, 2015 14:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fbigun/b7afa8e51a92171fb0b3 to your computer and use it in GitHub Desktop.
Save fbigun/b7afa8e51a92171fb0b3 to your computer and use it in GitHub Desktop.
测试成功
#!/usr/bin/env python3
while True:
print('Input "exit" or "enter", Exit the program')
a = input('input a num "a":')
if a == 'quit' or a == '': break
b = input('input a num "b":')
if b == 'quit' or b == '': break
try :
a = int(a)
b = int(b)
except :
print('input error,"a" or "b" not a number')
else :
if a == b :
print('a = b')
else :
print('a !=b')
print('bye!')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment