Reference no: EM132356487
Question
You must use Lists and Functions to write these programs.
Program 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
....
Program 2
Write a program using lists and functions that allows the user to select a month and then displays how many days are in that month. It does this by "looking up" information it has stored in the Lists.
Program 3
You are going to write a program called BankApp to simulate a banking application.
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