-
Notifications
You must be signed in to change notification settings - Fork 0
/
mix_number.py
43 lines (37 loc) · 1012 Bytes
/
mix_number.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
def mix_Number():
a=int(input('Enter the number: '))
while True:
if a==1:
print('''
1 is neither prime nor composite.
1 is odd.
1 is a positive integer.
''')
break
elif a==2:
print('''
2 is prime, even and a positive integer.
''')
break
if (a%2)!=0:
print(a,'is odd.')
else:
print(a,'is not odd.')
if (a%2)==0:
print(a,'is even number.')
else:
print(a,'is not even.')
if a<0:
print(a,'is negative integer.')
else:
print(a,'is positive integer.')
if a>1 and a!=2:
for i in range(2,a):
if (a%i==0):
print(a,'is not prime')
break
else:
print(a,'is prime.')
break
break
mix_Number()