Best writers. Best papers. Let professionals take care of your academic papers

Order a similar paper and get 15% discount on your first order with us
Use the following coupon "FIRST15"

Object Oriented Programming Basics

Object Oriented Programming Basics.

I’m studying for my Python class and don’t understand how to answer this. Can you help me study?

Object Oriented Programming Basics

Reading, June 10, 2020


  • Due: Wednesday, June 10th no later than 5pm.
  • Submission instructions: complete the assigned number of activities in each of the assigned subsections of Chapter 17. You do not need to submit anything to Brightspace.
  • Deadline reminder: once this deadline passes, Runestone Interactive will no longer allow you to collect points for completing the activities.

Key ideas

  • Thus far, we have used the procedural paradigm to solve problems. With the procedural paradigm, the focus on solving a problem is on the actions. In Python, these actions are implemented with functions.
  • Python also supports the object-oriented programming paradigm. With the OOP paradigm, the focus on solving a problem is on the objects. An object contains both data (called the state) and functionality (called methods).
  • Example: Consider the turtle module. This module is implemented using object-oriented programming.
  • Example:
  • Functions can take objects as parameters.
  • Functions can return objects.
  • Method __str__ can be used to override how objects are printed, e.g. print(object).
  • It is common to split classes into their own files and import them.


Grading – 10 points

  • 10 points – the required number of activities were completed for each subsection before the deadline.

Grading turnaround

This reading assignment will be graded with scores in Brightspace by office hours the following class day.

Optional activities


Create a class named Pokemon that has the following instance variables: number, name, and combat_points. Add a constructor method that enables a new Pokémon to be created. Add methods named get_name, get_number, get_combat_pointsand set_combat_points. Then, write a program that utilizes the functionality of the Pokemon class in its entirety.


In the game of Black Jack, an ace is worth 11 points, a king is worth 10 points, a queen is worth 10 points, a jack is worth 10 points, and all other cards are worth face value. Download card.pyand onto your local machine. Complete method assign_value and function process_handsuch that the following output is produced when the program is run.

<code>ace of spades, king of diamonds evaluates to 21_x000D_
queen of hearts, ace of spades evaluates to 21_x000D_
ace of spades, jack of clubs evaluates to 21_x000D_
ten of spades, ace of spades evaluates to 21_x000D_
two of spades, three of clubs, four of diamonds, five of hearts, six of spades, seven of clubs evaluates to 27_x000D_
eight of diamonds, nine of hearts, two of spades evaluates to 19_x000D_



  • Answer the following questions:
    1. What is cards in the program?
    2. What does the Deck constructor do?
  • Uncomment the two commented statements at the bottom and supply the missing shufflemethod.
  • Split the solution into three files:, and

Object Oriented Programming Basics