Skip to content

Instantly share code, notes, and snippets.



Last active Aug 29, 2015
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')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment