Trying to make progress with the challenge...

This commit is contained in:
Cory
2024-05-08 12:37:25 -04:00
parent 6ce564f821
commit de981ca670
5 changed files with 131 additions and 6 deletions

17
die.py Normal file
View File

@@ -0,0 +1,17 @@
# die.py
# ------
# By MWC Contributors
# Implments a Die class.
from random import randint
class Die:
def __init__(self):
self.roll()
def __str__(self):
return str(self.face)
def roll(self):
self.face = randint(1, 6)
return self.face