Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please help python code QUESTION 3 35 points Save Answer C. Consider course = {131: Pyrhon, 231: Java, 355: Pen Testing, 520: Data Mining} Into

Please help python code

image text in transcribed
QUESTION 3 35 points Save Answer C. Consider course = {131: "Pyrhon", 231: "Java", 355: "Pen Testing", 520: "Data Mining"} Into the dictionary course above, both of the following can add a new course, 505 "Foundation". 14.[5pts] course[_ = 15.[5pts] course 16 [5pts] Suppose that a temporary dictionary "temp" is a pair of the key and value to update. Is the following statement valid to perform both addition and modification? [True / False] course.update(temp) 17-19 [20pts]) Consider the determination of graduate courses. If the course number is greater than 499, it is called a graduate course; otherwise it is an undergraduate course. By this determination, the given course dictionary is split into two dictionaries: grad and under. Fill in the blank in the function below: [Warning] Fill in blanks only! If your answer does not point out precisely to a blank to fill in, it will be 0 point. def splitCourse(crs): keys = # extract keys from the dictionary grad = 0 # initialization under = {} # initialization for key in : # a list of the keys If grad[key] = course[key] else: under[key] = course[key] print(grad) print(under)

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

Unity From Zero To Proficiency Beginner A Step By Step Guide To Coding Your First Game

Authors: Patrick Felicia

1st Edition

1091872023, 978-1091872028

More Books

Students also viewed these Programming questions