Question: Problem Description: In this program we are going to explore a very elementary 'database' using Python. Your program should create and store a list of
Problem Description: In this program we are going to explore a very elementary 'database' using Python. Your program should create and store a list of 20 student names and their corresponding scores Then prompt the user to enter a student name and then display the student's name along with his/her corresponding score. The user should be able to keep looking up student scores until he/she enters the single character'q' to quit the program. Inputs Your Python program should accept a name as input and keep asking for names until they enter 'q' to quit. Output Your program should print the corresponding student's name and score. Please see examples of output below Approach Start by entering and running the following Python code names [Jim', 'Sarah', Jason', 'Lynne', 'Ginny', 'Joe', 'Susan'] print (names) You should see that Python displays your list of names. Now see what happens when you change the second line to print (names[0] + ,' + names[1]) You should see that Python prints the first two names. It is worth noting that names[0] displays the first name in the list and names[1].displays the second name. 1. 2. 3. Now write a loop to display all the names in the list, one per line. Your program will look like this
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
