question is uploaded

User Generated

noqhy1996

Programming

Description

question + instructions are uploaded

Unformatted Attachment Preview

10/31/2017 CSCI 127, In-Lab 9 Lab 9: Review Logistics Due: Tuesday, October 31st no later than midnight. Partner Information: Complete this assignment individually. Submission Instructions: Upload your solution, named YourFirstName-YourLastName.py to the BrightSpace Lab 9 Dropbox. Deadline Reminder: Once this deadline passes, BrightSpace will no longer accept your Python submission and you will no longer be able to earn credit. Thus, if you are not able to fully complete the assignment, submit whatever you have before the deadline so that partial credit can be earned. Learning Outcomes This lab should help you prepare for Friday's practicum by identify topics you understand well and topics you need to continue practicing. Assignment Last Spring, a pilot offering of The Joy and Beauty of Data was offered at Bozeman High School. Answer each question on the practicum that was given at BHS. Grading - 10 points 3 points - Question 1 has an answer. 4 points - Question 2 has an answer. 3 points - Question 3 has an answer. Grading note: You will receive full credit for submitting any reasonable answer. Sample solutions to each question will be covered in lecture on November 1st. If Time Remains Work on Program 4, which is also due tonight at midnight, seeking feedback from your lab assistant if desired. https://www.cs.montana.edu/paxton/classes/csci127/inlabs/lab9/ 1/1 Joy and Beauty of Data, Second Practicum – March 30, 2017 Name _______________________________________________________________ Question One. 25 points. Supply the missing function so that when this code runs: stranger_things = {} stranger_things["The Vanishing of Will Byers"] = "The Duffer Brothers" stranger_things["The Weirdo on Maple Street"] = "The Duffer Brothers" stranger_things["Holly, Jolly"] = "Shawn Levy" stranger_things["The Body"] = "Shawn Levy" stranger_things["The Flea and the Acrobat"] = "The Duffer Brothers" stranger_things["The Monster"] = "The Duffer Brothers" stranger_things["The Bathtub"] = "The Duffer Brothers" stranger_things["The Upside Down"] = "The Duffer Brothers" episodes_directed(stranger_things, "The Duffer Brothers") episodes_directed(stranger_things, "Shawn Levy") episodes_directed(stranger_things, "Kerri Cobb") The following output is produced: The Duffer Brothers directed 6 episodes Shawn Levy directed 2 episodes Kerri Cobb directed 0 episodes Question Two. 50 points. Supply the missing class and methods so that when this code runs: # “Stranger Things” is the title of the series. # “The Duffer Brothers” is the creator of the series. # 1 is the number of seasons that the series has run. # 8 is the number of episodes that the series contains. stranger_things = Series("Stranger Things", "The Duffer Brothers", 1, 8) print(stranger_things) stranger_things.addSeason() stranger_things.addEpisodes(9) print(stranger_things) # here comes the next season # there are now 9 more episodes The following output is produced: Stranger Things has aired 8 episodes over 1 seasons. Stranger Things has aired 17 episodes over 2 seasons. Question Three. 25 points. Object Oriented Concepts. (a) What is the name of the constructor method in a class? (b) Suppose the class Athlete is already defined and we want to define a new class called Runner that is a subclass of Athlete. Complete the following one line of Python: class Runner (c) In the context of the Athlete class, give a concrete example of the difference between an instance and an instance variable. (d) Describe briefly the difference between a reader method and a writer method. (e) To override the + operator, an __add__ method can be defined in a class. What method must be defined to override the ** operator?
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

This question has not been answered.

Create a free account to get help with this and any other question!

Related Tags