-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathif statements.py
48 lines (35 loc) · 881 Bytes
/
if statements.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
44
45
46
47
48
# def check_number(number):
# if number < 0:
# print("Number is negative")
# elif number >0:
# print("Number is positive")
# check_number(23)
# check_number(-11)
# check_number(100)
# def return_max(number1,number2):
# if number1 > number2:
# return number1
# else:
# return number2
# print(return_max(23,44))
# print(return_max(34,45))
# print(return_max(54,45))
# print(return_max(70,12))
def return_grading(mark):
if (mark>90):
grading="A"
return grading
elif (mark>=85) and (mark <90):
grading="B"
return grading
elif (mark>=80) and (mark <85):
grading="C"
return grading
else:
grading="D"
return grading
print(return_grading(100))
print(return_grading(80))
print(return_grading(55))
print(return_grading(75))
print(return_grading(33))