In [3]:
x = 2
In [4]:
y = x % 2
y
Out[4]:
0
In [5]:
if y == 0:
print(str(x) + " is an even number")
else:
print(str(x) + " is an odd number")
2 is an even number
Creating a function¶
In [6]:
def odd_even(x):
y = x % 2
if y == 0:
print(str(x) + " is an even number")
else:
print(str(x) + " is an odd number")
In [7]:
odd_even(5)
5 is an odd number
Luckyland Hotel & Casino - Mapyro
ReplyDeleteFind the best value for your trip to the 제주도 출장안마 Las Vegas Strip in a few minutes. Luckyland 출장마사지 Casino in Las Vegas, Nevada. Address: 3131 South Las Vegas Blvd. Rating: 8.4/10 세종특별자치 출장안마 · 2,361 김해 출장샵 reviews 하남 출장마사지