Skip to content

Instantly share code, notes, and snippets.

@Jackustc
Created November 27, 2017 00:35
Show Gist options
  • Select an option

  • Save Jackustc/35a4af32b1e7c263bbc325243d504d93 to your computer and use it in GitHub Desktop.

Select an option

Save Jackustc/35a4af32b1e7c263bbc325243d504d93 to your computer and use it in GitHub Desktop.
while True:
num = input('Please input an integer:')
try:
num = int(num)
except:
print('Please input an integer!')
break
if num%2 == 1:
print('Your input ' +str(num)+ ' is an odd.')
else:
print('Your input ' +str(num)+ ' is an even.')
if num % 4 ==0:
print('And your input '+str(num)+' is also a multiple of 4!')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment