Question: # next the function gpa(courses) to calculate the GPA Python Coding Problem # It is acceptable syntax for list, dictionary, JSON and the likes to

# next the function gpa(courses) to calculate the GPA

Python Coding Problem

# It is acceptable syntax for list, dictionary, JSON and the likes to be spread over multiple lines.

courses = [

{ "class":"Intro to DS", "id":"DATS 6101", "semester":"spring", "year":2018, "grade":'B-', "credits":3 } ,

{ "class":"Data Warehousing", "id":"DATS 6102", "semester":"fall", "year":2018, "grade":'A-', "credits":4 } ,

{ "class":"Intro Data Mining", "id":"DATS 6103", "semester":"spring", "year":2018, "grade":'A', "credits":3 } ,

{ "class":"Machine Learning I", "id":"DATS 6202", "semester":"fall", "year":2018, "grade":'B+', "credits":4 } ,

{ "class":"Machine Learning II", "id":"DATS 6203", "semester":"spring", "year":2019, "grade":'A-', "credits":4 } ,

{ "class":"Visualization", "id":"DATS 6401", "semester":"spring", "year":2019, "grade":'C+', "credits":3 } ,

{ "class":"Capstone", "id":"DATS 6101", "semester":"fall", "year":2019, "grade":'A-', "credits":3 }

]

def find_gpa(courses):

# write an appropriate and helpful docstring

total_grade_point_credit =0 # initialize

total_credits =0 # initialize

# ?????? fill in your codes here

# gpa = ?????

return gpa

# Try:

print(" %.2f " % find_gpa(courses) )

# What is the input (function argument) data type for find_gpa?

# What is the output (function return) data type for find_gpa(courses) ?

# next the function gpa(courses) to calculate the GPA Python Coding Problem

###################################### Q4 ############################### # next the function gpa(courses) to calculate the GPA # It is acceptable syntax for list, dictionary, JSON and the likes to be spread over multiple lines. courses = [ { "class":"Intro to DS", "id":"DATS 6101", "semester":"spring", "year":2018, "grade" : 'B-', "credits":3 } , { "class":"Data Warehousing", "id": "DATS 6102", "semester":"fall", "year":2018, "grade" : 'A-', "credits":4} , { "class":"Intro Data Mining", "id":"DATS 6103", "semester":"spring", "year":2018, "grade":'A', "credits":3} , { "class":"Machine Learning I", "id":"DATS 6202", "semester":"fall", "year":2018, "grade" : 'B+', "credits":4 } , { "class":"Machine Learning II", "id":"DATS 6203", "semester":"spring", "year":2019, "grade" : 'A-', "credits":4}, { "class":"Visualization", "id":"DATS 6401", "semester":"spring", "year":2019, "grade" : 'C+', "credits":3 } , { "class":"Capstone", "id":"DATS 6101", "semester":"fall", "year":2019, "grade" : 'A-", "credits":3} def find gpa (courses): # write an appropriate and helpful docstring total_grade_point_credit =0 # initialize total_credits =0 # initialize # ?????? fill in your codes here # gpa = ????? return gpa # Try: print(" %.2f " % find_gpa(courses) ) # What is the input (function argument) data type for find_gpa? # What is the output (function return) data type for find_gpa(courses)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!