forked from lonniebowe/TestingPractice
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscoringDemo.py
More file actions
45 lines (39 loc) · 987 Bytes
/
scoringDemo.py
File metadata and controls
45 lines (39 loc) · 987 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
class ScoreMachine:
def __init__(self):
pass
def aces(self,rolls):
total = 0
for item in rolls:
if item == 1:
total += item
return total
def deuces(self, rolls):
total = 0
for item in rolls:
if item == 2:
total += item
return total
def tres(self, rolls):
total = 0
for item in rolls:
if item == 3:
total += item
return total
def quads(self, rolls):
total = 0
for item in rolls:
if item == 4:
total += item
return total
def pentas(self, rolls):
total = 0
for item in rolls:
if item == 5:
total += item
return total
def hextas(self, rolls):
total = 0
for item in rolls:
if item == 6:
total += item
return total