Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1)Write a program called StudentGrades using lists and loops to ask for student name and 3 test scores. Calculate the average of the test scores

1)Write a program called StudentGrades using lists and loops to ask for student name and 3 test scores. Calculate the average of the test scores and assign a letter score as follows: >90 A 80 - 89 B 70 - 79 C 60 - 69 D <60 F Hint" write for 3 student, then modify to ask user how many students. Create separate lists for Student, Score1, Score2, Score3. Use "FOR" loops to populate and extract data from the lists. Output sample: How many students? 3 Enter Name of student 1: John Enter Name of student 2: Jane Enter Name of student 3: Jim Enter test 1 for John: 90 Enter test 2 for John: 90 Enter test 3 for John: 90 .... Student 2,3 John's test average is 90 John's Letter grade is A ....

2.) Create a list of 3 users called "Customers" [Mike, Jane, Steve] Create a list of Balances [300, 300, 300] corresponding to the initial balances for each customer. When a user runs your program, it should ask for the users name first. Check if the name matches a customer in the list. Store the index number of this customer in a variable. Use this variable to reference the correct balance in the balance list later in the program. After asking for the user name, display a menu with the following options and ask the user for input (Use a While Loop). Type D to deposit money Type W to withdraw money Type B to display Balance Type C to change user, display user name Type E to exit If the user types D (Deposit Function) Ask the user to enter the amount to deposit. Then call the Deposit Function, passing the deposit amount as a parameter. The function should update the Balance. Then display the new balance (this should not happen in the function). Then display the menu again If the user types W then (Withdraw Function) Ask the user to enter the amount he/she wants to withdraw. Before calling the withdraw function, make sure there is enough balance. Call the Balance function before Withdraw function!! Then call the Withdraw Function, passing the withdraw amount as a parameter. The function should update the Balance. Display the new balance to the user (this should not happen in the function). Then display the menu again If the user enters B, then Display the Balance. If the user enters C then Ask for the user name and change the index number variable to match. If the user types E. then Terminate the program. If the user types any other option:

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design For Mere Mortals

Authors: Michael J Hernandez

4th Edition

978-0136788041

More Books

Students also viewed these Databases questions

Question

=+4 What are non-union workers representations?

Answered: 1 week ago