-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathQ9.py
More file actions
60 lines (42 loc) · 1.07 KB
/
Q9.py
File metadata and controls
60 lines (42 loc) · 1.07 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# Q9 check number is odd or even
A = 25
if A % 2 == 0:
print(A, 'is Even number')
else:
print(A, 'is odd')
#############################################################33
# Q10 check year is leap or not
year = 2024
if (year % 400) == 0:
print (year,'is leap year')
elif (year % 4) ==0 and (year % 100) != 0:
print(year,'is leap year')
else:
print('not a leap year')
###############################################
# Q11
A = 4
if A == 1:
print('yes python certified')
elif A == 2:
print('yes java certified')
else:
print('invalid user')
################################################################
#12
BS = 2000
TA = BS*10/100
DA = BS*20/100
HRA = BS*15/100
GS = TA+DA+HRA+BS
print(GS)
################################################################
# Q13 check triangle is valid or not
A = 40
B = 50
C = 10
if A+B+C == 180:
print('triangle is valid')
else:
print('triangle is not valid')
#############################################################################3