-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBobTestApplication.py
More file actions
41 lines (33 loc) · 918 Bytes
/
BobTestApplication.py
File metadata and controls
41 lines (33 loc) · 918 Bytes
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
def main():
iterations = getIterations()
getAverage(iterations)
def getIterations():
return int(input("How many numbers will you add?"))
def getAverage(y):
firstList=[]
for a in range (0,y):
testscore=int(input("Enter your test score:"))
firstList.append(testscore)
firstList.append(100)
lengthofList=len(firstList)
sum=0
print("The numbers you entered were:", end=" ")
for c in range(0,lengthofList):
print(firstList[c], end=" ")
sum=sum+firstList[c]
firstList.append(100)
sum=sum+firstList[lengthofList]
print("")
print("The average of your numbers are",sum/lengthofList+1)
'''
for c in len(firstList):
print(b)
for b in firstList:
print(b)
firstList.append(100)
lengthofList=len(firstList)
for c in len(firstList):
sum=sum+firstList[c]
print(firstList[c])
'''
main()