Answered step by step
Verified Expert Solution
Question
1 Approved Answer
PYTHON WILL RATE Problem 4.5.31 Problem Set 4.5: Dictionaries 1 C$1301 Courseware I Edge 1/18/18, 1:43 AM GTx: CS1301 Introduction to Computing using Python (Fall
PYTHON WILL RATE
Problem 4.5.31 Problem Set 4.5: Dictionaries 1 C$1301 Courseware I Edge 1/18/18, 1:43 AM GTx: CS1301 Introduction to Computing using Python (Fall 2018) Help agill31 Problem 4.5.3 The problems on this page all ask you to right individual lines of code. Because they are interpreted by an autograder instead of executed as code, make sure to follow these rules: Do not use multiple consecutive spaces. In other words, don't write myVar5, instead write myVar- 5 or myVar-5. Do not use both apostrophes and quotation marks to declare strings in the same line; choose one or the other. In other words, don't write myDict['myKey']-"text!", write either myDict[ "myKey")-"text!" or myDict'myKey'-'text!'. While you could do these things in real code, these restrictions are necessary for the text-based autograder If all else fails, take a look at some of our course videos again and make sure the line you're writing is similar (similar spacing, similar use of parentheses, etc.). Problem 4.5.3 Part 1 of4 1/1 point (graded) Let's write a gradebook program. Our goal in this program is to have a dictionary where the keys are student names, and the values are lists of each student's grades represented by integers. So, for example, the key "David" might be associated with the list of integers [20, 19, 18, 20, 19] To do this, we need a function to add a new grade to an individual student in the dictionary. If the student does not already exist in the dictionary, we should add them to the dictionary before adding their grade Let's write this line by line. This will be a four-line function. https://edge.edx.org/courses/course-v1:GTx.CS1301+2018_T3/cours..T3%2Btype%40vertical%28block%407e3a51235dec4cdb832bect8ebcdoed2 Page 1 of 4Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started