Skip to content

Instantly share code, notes, and snippets.

@fbigun fbigun/test.py
Last active Aug 29, 2015

Embed
What would you like to do?
测试成功
#!/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
You can’t perform that action at this time.