Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Python Problem ###################################### Q6 ############################### # write a function (with arguement of courses) to print out the complete transcript and the gpa at the end

Python Problem

###################################### Q6 ###############################

# write a function (with arguement of courses) to print out the complete transcript and the gpa at the end

# 2018 spring - DATS 6101 : Intro to DS (3 credits) B- Grade point credits: 8.10

# 2018 fall - DATS 6102 : Data Warehousing (4 credits) A- Grade point credits: 14.80

# ........ few more lines

# Cumulative GPA: ?????

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 printTranscript(courses):

for course in courses:

# print out each record as before

# after the completion of the loop, print out a new line with the gpa info

return # or return None

# Try to run, see if it works as expected to produce the desired result

# courses is already definted in Q4

printTranscript(courses)

image text in transcribed

###################################### 06 ##*********#################### # write a function (with arguement of courses) to print out the complete transcript and the gpa at the end # 2018 spring - DATS 6101 : Intro to DS (3 credits) B- Grade point credits: 8.10 # 2018 fall - DATS 6102 : Data Warehousing (4 credits) A- Grade point credits: 14.80 # ........ few more lines # Cumulative GPA: 77??? 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":"AF", "credits":3 }, def printTranscript(courses): for course in courses: # print out each record as before # after the completion of the loop, print out a new line with the gpa info return # or return None # Try to run, see if it works as expected to produce the desired result # courses is already definted in 04 printTranscript(courses) # What is the input (function argument) data type for printTranscript? # What is the output (function return) data type for printTranscript(courses)

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

Essential Data Protection For Estate Agencies In Singapore 2024

Authors: Yang Yen Thaw Yt

1st Edition

B0CQK79WD3, 979-8872095392

More Books

Students also viewed these Databases questions