@TristinKeenan/

GLaDOS Code 20

Python

loops 4

fork
loading
Files
  • main.py
main.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
#Does NOT work right.


#primers (Setting)

Grade1 = 0 
number_of_names = 0
GradeSum = 0
GradeCount = 0
HighestGrade = Grade1
HighestGradeName = "N/A"
grade = "Enter a grade: [Enter a negative to stop] "



#  primers (1 use)


name = "Enter a Name: [Enter STOP to end] "
name1 = input(name)
Grade1 = float(input(grade))
print("\n\n")

#Loops until name1 != "STOP", or Grade <= 0


while Grade1 >=0 or name1 != "STOP":
  
  number_of_names = number_of_names + 1
  if Grade1 > HighestGrade:
    HighestGrade = Grade1
    HighestGradeName = name1
  name1 = input(name)
  Grade1 = float(input(grade))
  print("\n\n")
print("The number of names is: ",number_of_names)
print("The highest grade is ", HighestGrade," which was earned by ", HighestGradeName)