Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The language is python 3. Please help. Lab 6: Student Database Due: Friday, Mar 15th at 11:59 PM Effectively use loops, list comprehension, dictionaries, and

The language is python 3. Please help.
image text in transcribed
image text in transcribed
image text in transcribed
Lab 6: Student Database Due: Friday, Mar 15th at 11:59 PM Effectively use loops, list comprehension, dictionaries, and trylexcept blocks to implement a simple student grade database Anyone who ever served as a teaching assistant before learming management systems became prevalent would remember the massive and very confusing handwrtten spreadsheet where an instructor would track the grades of all students. As the semester went on and students added/dropped the class and more assignments were spreadsheets became increasingly complex created, these o avoid further issues, learning management systems created electronic gradebooks that allowed instructors to add assignments and input grades, as well as add or remove students from an active list. In this lab, you will be exploring a simple implementation of this functionality using Python lists and dictionaries. Of course you will not be using an actual database. Instead, a simple list will serve as your database that you will need to search and sift through when adding or modifying data. Some things to remember are lists and dictionary values can hold ANYTHING. Including other lists and dictionaries. Spend some time planning how you want to store the following information before you begin coding. For cleanliness, sometimes it is necessary to hold information in two places. Additionally, even though the user may be entering a number, it is not always the case that you should store this number as a float/integer. Sometimes it may be better to let it be a string Instuctions: You are responsible for witing a program that allows a user to do one of five things at a time 1. Add students to database. There should be no duplicate students. b. a. Enter name, age, and address. Search for students in the database by name. 2. a. Allow for search via prefix. That is, if the user types 'AUS' then all students whose names begin with AUS should be printed. b. If no text is entered, return all students. Show student name, followed by age, address, and all grades tabbed over. c. 3. Enter grade. a. User enters an assignment and prints an error if it does not exist. b. User enters a student name and prints an error if he/she does not exist. c. Once found, the student's grade is assigned. 4. Add assignment a. There should be no duplicate assignments b. Once an assignment is added, it exists for all students. c. The default grade is a character 5. Delete assignment. a. User enters an assignment and prints an error if it does not exist. b. The assignment is deleted for all students a. Quits the program. 6. Quit Example run: Welcome to the gradebook! What would you like to do? (1) New Student (2) Search Students (3) Enter Grade (4) Add Assignment (5) Delete Assignment (6) Quit Choice: 1 Name of student: Austin Graham Age of student: 22 Enter address of the student: 922 e1m Student AUSTIN GRAHAM added. What would you like to do? (1) New Student (2) Search Students (3) Enter Grade (4) Add Assignment (5) Delete Assignment (6) Quit Choice: 1 Name of student: Omar Mirza Age of student: 23 Enter address of the student: 822 Monnett Student OMAR MIRZA added. What would you like to do? (1) New Student (2) Search Students (3) Enter Grade (4) Add Assignment (5) Delete Assignment (6) Quit Choice: 1 Name of student: Austin Graham Age of student: 22 What would you 11ke to doi (1) New Student (2) Search Students (3) Enter Grade (4) Add Assignment (5) Delete Assignment (6) Quit Choice: 5 Enter the name of the assignment: Homework 1 HOMEWORK 1 removed. What would you like to do? (1) New Student (2) Search Students (3) Enter Grade (4) Add Assignment (5) Delete Assignment (6) Quit Choice: 2 Enter student name or prefix: AUS AUSTIN GRAHAM Age: 22 Address: 922 e1m HOMEWORK 2: - What would you like to do? (1) New Student (2) Search Students (3) Enter Grade (4) Add Assignment (5) Delete Assignment (6) Quit Choice: 6 Goodbye! Restrictions 1. You must use a list 2. You must use a dictionary. 3. You must use a try/except 4. All user errors must be handled (including type/value errors). a. It is up to you to decide which errors should be handled. 5. You must use an infinite loop. 6. You must use a break statement 7. You must use list comprehension

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

Step: 3

blur-text-image

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

50 Tips And Tricks For MongoDB Developers Get The Most Out Of Your Database

Authors: Kristina Chodorow

1st Edition

1449304613, 978-1449304614

More Books

Students also viewed these Databases questions