Question
Python Problem Q6 #%% ###################################### Q5 ############################### # Write a function to print out a grade record for a single class. # The return statement
Python Problem Q6
#%%
###################################### Q5 ###############################
# Write a function to print out a grade record for a single class.
# The return statement for such functions should be None or just blank
# while during the function call, it will display the print.
course = { "class":"IntroDS", "id":"DATS 6101", "semester":"spring", "year":2018, "grade":'B-', "credits":3 }
def printCourseRecord(course):
# write an appropriate and helpful docstring
# use a single print() statement to print out a line of info as shown here
# 2018 spring - DATS 6101 : Intro to DS (3 credits) B- Grade point credits: 8.10
# ?????? fill in your codes here
Course_record = course['credits']*to_gradepoint(course['grade'])
print(course['year'], course['semester'], "-", course['id'], ":", course['class'], '(', course['credits'], "credits", ')', course['grade'], "Grade point credits:", " %.2f" % Course_record)
return # or return None
# Try:
printCourseRecord(course)
# What is the input (function argument) data type for printCourseRecord?
# What is the output (function return) data type for printCourseRecord(course) ?
#%%
###################################### 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: ?????
def printTranscript(courses):
# write an appropriate and helpful docstring
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)
# What is the input (function argument) data type for printTranscript?
# What is the output (function return) data type for printTranscript(courses) ?
99 100 #************************************* 05 ###**************************** # Write a function to print out a grade record for a single class. # The return statement for such functions should be None or just blank # while during the function call, it will display the print. course = { "class":"Intro to DS", "id": "DATS 6101", "semester":"spring", "year":2018, "grade" : 'B-T, "credits":3} 102 103 104 105 106 107 def printCourseRecord(course): # write an appropriate and helpful docstring # use a single print() statement to print out a line of info as shown here #2018 spring - DATS 6101 : Intro to DS (3 credits) B- Grade point credits: 8.10 # ?????? fill in your codes here Course_record = course['credits']*to_gradepoint (course ''grade']), print(course['year'l, coursel' semester'], "-", coursel'id'], ":", course['class'l, return (, course['credits'l, "credits", 108 109 110 111 112 113 114 115 ")", course['grade'l, # Try: printCourseRecord(course) 116 117 118 119 # What is the input (function argument) data type for printCourseRecord? # What is the output (function return) data type for printCourseRecord(course) ? Week03_hw.py (deleted) X 144 Users > IgnatiosDraklellis > Desktop > Week03_hw.py > .... Run Cell RUN ADove Debug cell 141 142 143 # 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 145 # 2018 fall - DATS 6102 : Data Warehousing (4 credits) A- Grade point credits: 14.80 146 # ... few more lines 147 # Cumulative GPA: ????? 148 149 def printTranscript(courses): 150 # write an appropriate and helpful docstring 99 100 #************************************* 05 ###**************************** # Write a function to print out a grade record for a single class. # The return statement for such functions should be None or just blank # while during the function call, it will display the print. course = { "class":"Intro to DS", "id": "DATS 6101", "semester":"spring", "year":2018, "grade" : 'B-T, "credits":3} 102 103 104 105 106 107 def printCourseRecord(course): # write an appropriate and helpful docstring # use a single print() statement to print out a line of info as shown here #2018 spring - DATS 6101 : Intro to DS (3 credits) B- Grade point credits: 8.10 # ?????? fill in your codes here Course_record = course['credits']*to_gradepoint (course ''grade']), print(course['year'l, coursel' semester'], "-", coursel'id'], ":", course['class'l, return (, course['credits'l, "credits", 108 109 110 111 112 113 114 115 ")", course['grade'l, # Try: printCourseRecord(course) 116 117 118 119 # What is the input (function argument) data type for printCourseRecord? # What is the output (function return) data type for printCourseRecord(course) ? Week03_hw.py (deleted) X 144 Users > IgnatiosDraklellis > Desktop > Week03_hw.py > .... Run Cell RUN ADove Debug cell 141 142 143 # 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 145 # 2018 fall - DATS 6102 : Data Warehousing (4 credits) A- Grade point credits: 14.80 146 # ... few more lines 147 # Cumulative GPA: ????? 148 149 def printTranscript(courses): 150 # write an appropriate and helpful docstring
Step 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