Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- seq=[]
- i=0
- while True:
- i=i+1
- num=input("Input score (or ENTER to finish): ")
- if num=="":
- break
- elif type(int(num))==int or type(float(num))==float:
- seq.append(float(num))
- for x in range(len(seq)):
- print(f"Student #{x+1} score: {int(seq[x])}")
- print(f"Average score is {sum(seq)/len(seq):.2f}")
- print(f"Minimum score is {int(min(seq))}")
- print(f"Maximum score is {int(max(seq))}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement