Skip to content

Commit 543fed0

Browse files
committed
Add code-along files
1 parent 6456768 commit 543fed0

3 files changed

Lines changed: 25 additions & 1 deletion

File tree

Refactoring/refactoring_5_inheritance.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Each player takes turn rolling a die and moving that number of spaces.
55
The first person to space 100 wins.
66
7-
Object-oriented with a Player and Game objects
7+
Object-oriented with a LuckyPlayer and Game objects
88
"""
99
import random
1010

bike_example.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
"""
2+
Bike class for use in a retail shop
3+
"""
4+
5+
6+
if __name__ == '__main__':
7+
# Create bike
8+
9+
# Update sale price
10+
11+
# Sell bike
12+
13+
# Determine profit
14+
pass

game_refactoring.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
"""
2+
Simulate a simple board game.
3+
There are 2 players.
4+
Each player takes turn rolling a die and moving that number of spaces.
5+
The first person to space 100 wins.
6+
"""
7+
8+
9+
if __name__ == '__main__':
10+
pass

0 commit comments

Comments
 (0)