-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinitial.py
More file actions
59 lines (57 loc) · 2.23 KB
/
initial.py
File metadata and controls
59 lines (57 loc) · 2.23 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
# (****** Student Grading and Ranking system *******)
# (step 1 **** )
total_marks=30
print("Student grading scheme *** --- *** ")
while True:
# (use of while loop will run it again and again untill we does
# not enter greater than 30 or enter no when ask for your opinion )
student=str(input("Enter student name : "))
marks=float(input("Enter student marks : e.g(0 to 30) "))
# (step 2 **** )
# (here heavy use of conditional statements )
if marks <0:
print("-" * 30)
print("Student Name : ", student)
print("Total marks are ",total_marks )
print("student get negetive marks -->",marks, "and has grade : F \n Rank= Fail")
print("-" * 30)
elif 0 <= marks <= 5:
print("-" * 30)
print("Student Name : ", student)
print("Total marks are ",total_marks )
print("student get -->",marks, "and has grade : C \n Rank= Poor")
print("-" * 30)
elif marks <=15:
print("-" * 30)
print("Student Name : ", student)
print("Total marks are ",total_marks )
print("student get -->",marks, "and has grade : B \n Rank= Good")
print("-" * 30)
elif marks <=25:
print("-" * 30)
print("Student Name : ", student)
print("Total marks are ",total_marks )
print("student get -->",marks, "and has grade : A \n Rank= Excellent")
print("-" * 30)
elif marks<=30:
print("-" * 30)
print("Student Name : ", student)
print("Total marks are ",total_marks )
print("student get -->",marks, "and has grade : A+ \n Rank= Outstanding")
print("-" * 30)
else:
print("-" * 30)
print("You cannot enter more than 30 marks ---***--- ")
print("-" * 30)
break
# (here this will break the system totally )
# (step 3 **** )
checker=str(input("Do you want to continue : (yes/no)")).lower()
if checker=="yes":
# (here it want to know you opinion for moving forward )
print("You can move forward : ")
print("Student grading scheme *** --- *** ")
else:
print("Stop you can not move forward : ")
break
# (----****---- The End ----****---- )