Skip to content

Commit 4e92b5f

Browse files
committed
resubmitting with ROI calculations
1 parent 5ade7b4 commit 4e92b5f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

code/jonpan/lab05.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,10 @@ def pick_number(x=6):
3333
balance += 25000000
3434

3535
payoff = balance + ticket_cost
36+
ROI = (payoff - ticket_cost) / payoff
37+
# ROI_pct = "{. 0%}".format(ROI)
38+
# print(ROI_pct)
3639

37-
print(payoff)
40+
print(f"\nPayoff: {payoff} ")
41+
print(f"\nExpenses: {ticket_cost} ")
42+
print(f"\nROI: {ROI:.0%} ")

0 commit comments

Comments
 (0)