-
Notifications
You must be signed in to change notification settings - Fork 248
Player Class
Sar Champagne Bielert edited this page Apr 19, 2024
·
1 revision
Unit 5 Session 1 (Click for link to problem statements)
Understand what the interviewer is asking for by using test cases and questions about the problem.
- What attributes does the Player class require for instantiation?
- The Player class requires a character name and a kart model for instantiation.
Plan the solution with appropriate visualizations and pseudocode.
General Idea: Use the provided Player class constructor to create a new instance with specific attributes.
1) Instantiate a Player object with "Yoshi" as the character and "Super Blooper" as the kart.
2) Store this object in a variable named `player_one`.
- Misplacing the order of parameters when calling the constructor.
- Incorrectly spelling the parameters' values.
player_one = Player("Yoshi", "Super Blooper")