Question1: Write a Python Program that asks for the grades of 5 quizzes and then prints the highest grade. [6 Marks]
Question2: Write a Python Program that does the following tasks. [8 Marks]
Create an empty list
Ask the user for 5 positive numbers and append them to the list
Find and print the sum of all the numbers in the list
Delete the last element from the list and then print the list
Question3: Consider you have the following data for some user accounts: [6 marks]
Username
Password
User1
101010
User2
112121
User3
211211
User4
312132
1.
#Python Program that asks for the grades of 5 quizzes and then prints the highest grade.
grades = []
for __ in range(5):
grades.append(int(input()))
print(max(grades))
2.
'''
Write a Python Program that does the following tasks. [8 Marks]
Create an empty list
Ask the user for 5 positive numbers and append them to the list
Find and print the sum of all the numbers in the list
Delete the last element from the list and then print the list
'''
li = []
for __ in range(5):
li.append(int(input()))
print(sum(li))
temp = li.pop()
print(li)
3. Please type out the whole question, for the answer.
Get Answers For Free
Most questions answered within 1 hours.