Question

Question1: Write a Python Program that asks for the grades of 5 quizzes and then prints...

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


Homework Answers

Answer #1

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.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
1)Write a program that asks a user for a number. If (and only if) the number...
1)Write a program that asks a user for a number. If (and only if) the number is greater than zero print “The number is valid” 2)Write a program that asks a user for a grade. If (and only if) the grade is greater than zero and less than 101, print “The grade is valid” 3)Write a program that asks a user how many widgets they want to buy and prints out what the user should pay. Widgets costs 10 dollars....
IN PYTHON : Write a program that asks the user for a number. Write the number...
IN PYTHON : Write a program that asks the user for a number. Write the number to a file called total.txt. Then ask the user for a second number. Write the new number on line 2 with the total for both numbers next to it separated by a comma. Then ask the user for a third number and do the same. Keep asking for numbers until the person puts in a zero to terminate the program. Close the file. Be...
- Write a Python program which asks the user to enter a number, if the number...
- Write a Python program which asks the user to enter a number, if the number is divisible by 6 or 7, the program prints “The number X is divisible by 6 or 7” and if the number is neither divisible by 6 nor by 7, then it prints “The number X is not divisible by 6 and 7”.
Please use Python 3 4). Write a program that asks the user to enter 10 numbers....
Please use Python 3 4). Write a program that asks the user to enter 10 numbers. The program should store the numbers in a list and then display the following data: • The lowest number in the list • The highest number in the list •The total of the numbers in the list • The average of the numbers in the list   Sample input & output: (Prompt) Enter Number 1: (User enter) 4 (Prompt) Enter Number 2: (User enter) 7...
Write a Python program that asks users to input 10 float numbers (using a while statement),...
Write a Python program that asks users to input 10 float numbers (using a while statement), and print the minimum number.
Write a program using Matlab that asks the user for their last three grades and final...
Write a program using Matlab that asks the user for their last three grades and final grade and gives them their overall final grade. The three Midterms are worth 70% and Final is worth 30%. The program will display their Final grade with a grade letter corresponding to it. Run your program and verify that it operates correctly (hint: you might need to use “If, else statements”)
Write a program that asks the user to enter an odd number and prints out a...
Write a program that asks the user to enter an odd number and prints out a triangle pattern. For example, if the user enters 5, the output is note: There is one space between the numbers in each line 1 3 5 1 3 1 If the user enters 9 the output is: 1 3 5 7 9 1 3 5 7 1 3 5 1 3 1 program language: C++
How to code this in python Write a program that computes and prints the first 1000...
How to code this in python Write a program that computes and prints the first 1000 prime numbers - simply write out each prime number on a new line. In implementing this solution I want you to define 2 functions: is_prime which can be used to test whether a number is a prime (e.g. is_prime(17) returns True but is_prime(9) returns False) and compute_primes which will return an array (or Python list) of the first n primes where n is passed...
Python: Simple Banking Application Project Solution: • Input file: The program starts with reading in all...
Python: Simple Banking Application Project Solution: • Input file: The program starts with reading in all user information from a given input file. The input file contains information of a user in following order: username, first name, last name, password, account number and account balance. Information is separated with ‘|’. o username is a unique information, so no two users will have same username. Sample input file: Username eaglebank has password 123456, account number of BB12 and balance of $1000....
Write a Python script that asks the user for their Scrabble rack and prints all valid...
Write a Python script that asks the user for their Scrabble rack and prints all valid Scrabble words that can be constructed from that rack, along with their Scrabble scores, sorted by score. An example input and output: ZAEFIEE 17 feeze 17 feaze 16 faze 15 fiz 15 fez 12 zee 12 zea 11 za 6 fie 6 fee 6 fae 5 if 5 fe 5 fa 5 ef 2 ee 2 ea 2 ai 2 ae
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT