Skip to content

Commit 8e12fe3

Browse files
committed
resubmitting lab05
1 parent 4e92b5f commit 8e12fe3

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

code/jonpan/lab05.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def pick_number(x=6):
1212

1313
balance = 0
1414
loops = 100000
15-
ticket_cost = (loops * -2)
15+
expenses = (loops * -2)
1616
winning_ticket = pick_number()
1717

1818
for x in range(loops):
@@ -32,11 +32,11 @@ def pick_number(x=6):
3232
elif match_counter == 6:
3333
balance += 25000000
3434

35-
payoff = balance + ticket_cost
36-
ROI = (payoff - ticket_cost) / payoff
35+
earnings = balance + expenses
36+
ROI = (earnings - expenses) / earnings
3737
# ROI_pct = "{. 0%}".format(ROI)
3838
# print(ROI_pct)
3939

40-
print(f"\nPayoff: {payoff} ")
41-
print(f"\nExpenses: {ticket_cost} ")
40+
print(f"\nEarnings: {earnings} ")
41+
print(f"\nExpenses: {expenses} ")
4242
print(f"\nROI: {ROI:.0%} ")

0 commit comments

Comments
 (0)