We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4e92b5f commit 8e12fe3Copy full SHA for 8e12fe3
code/jonpan/lab05.py
@@ -12,7 +12,7 @@ def pick_number(x=6):
12
13
balance = 0
14
loops = 100000
15
-ticket_cost = (loops * -2)
+expenses = (loops * -2)
16
winning_ticket = pick_number()
17
18
for x in range(loops):
@@ -32,11 +32,11 @@ def pick_number(x=6):
32
elif match_counter == 6:
33
balance += 25000000
34
35
-payoff = balance + ticket_cost
36
-ROI = (payoff - ticket_cost) / payoff
+earnings = balance + expenses
+ROI = (earnings - expenses) / earnings
37
# ROI_pct = "{. 0%}".format(ROI)
38
# print(ROI_pct)
39
40
-print(f"\nPayoff: {payoff} ")
41
-print(f"\nExpenses: {ticket_cost} ")
+print(f"\nEarnings: {earnings} ")
+print(f"\nExpenses: {expenses} ")
42
print(f"\nROI: {ROI:.0%} ")
0 commit comments