forked from logenkain/cig-cost
fix year calculation; fix per smoke decimal
This commit is contained in:
parent
1906414ef2
commit
82d15a69ef
@ -27,14 +27,14 @@ while True:
|
||||
break
|
||||
|
||||
|
||||
print("Your cigarettes cost", cost/20, "each")
|
||||
print("Your cigarettes cost", format(cost/20, '.2f'), "each")
|
||||
|
||||
print()
|
||||
print("You smoke: ")
|
||||
print(math.ceil(20 * packs), "per day")
|
||||
print(math.ceil(20 * packs * 7), "per week")
|
||||
print(math.ceil((20 * packs * 365)/12), "per month")
|
||||
print(math.ceil(20 * packs * 8 * 365), "per year")
|
||||
print(math.ceil(20 * packs * 365), "per year")
|
||||
|
||||
print()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user