cis_projects/ps1_2_joseph_green.py
2017-02-11 16:21:29 -07:00

19 lines
350 B
Python

#ask user for a number
#report even or odd
number = None
result = None
evenOdd = None
try:
number = int(input("Please enter a number: "))
result = number % 2
if result == 0:
evenOdd = "even"
else:
evenOdd = "odd"
print(str(number) + ",is an " + evenOdd + " number")
except:
print("Only enter an integers!")