8000 dice_game · dsabhrawal/python-examples@62ddf4f · GitHub
[go: up one dir, main page]

Skip to content

Commit 62ddf4f

Browse files
committed
dice_game
1 parent fd00340 commit 62ddf4f

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

applications/dice_game.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import random
2+
3+
4+
class Dice:
5+
def roll(self):
6+
x = random.randint(1, 6)
7+
y = random.randint(1, 6)
8+
return x, y
9+
10+
11+
d = Dice()
12+
print(d.roll())

0 commit comments

Comments
 (0)
0