Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
8ab3660e7f |
@ -4,6 +4,8 @@
|
||||
#output day, week, month year costs
|
||||
import os
|
||||
import math
|
||||
import ciglib
|
||||
from ciglib import fgColor
|
||||
|
||||
cost = None
|
||||
packs = None
|
||||
@ -40,32 +42,32 @@ while True:
|
||||
os.system('clear')
|
||||
break
|
||||
|
||||
print("Your cigarettes cost $" + format(cost/20, '.2f'), "each")
|
||||
print(fgColor.RED,"Your cigarettes cost $" + format(cost/20, '.2f'), "each", fgColor.NC)
|
||||
|
||||
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 * 365), "per year")
|
||||
print(fgColor.CYAN,"You smoke: ",fgColor.NC)
|
||||
print(fgColor.YELLOW,math.ceil(20 * packs), "cigarettes per day", fgColor.NC)
|
||||
print(fgColor.YELLOW,math.ceil(20 * packs * 7), "cigarettes per week",fgColor.NC)
|
||||
print(fgColor.YELLOW,math.ceil((20 * packs * 365)/12), "cigarettes per month",fgColor.NC)
|
||||
print(fgColor.YELLOW,math.ceil(20 * packs * 365), "cigarettes per year", fgColor.NC)
|
||||
|
||||
print()
|
||||
|
||||
print("This costs you: ")
|
||||
print(fgColor.CYAN,"This costs you: ",fgColor.NC)
|
||||
|
||||
tempCost = format(cost * packs, '.2f')
|
||||
tempHours = calcHours(tempCost)
|
||||
print("$" + tempCost, "and", tempHours, "hours per day")
|
||||
print(fgColor.GREEN,"$" + tempCost, "and", tempHours, "work hours per day",fgColor.NC)
|
||||
|
||||
tempCost = format(cost * packs * 7, '.2f')
|
||||
tempHours = calcHours(tempCost)
|
||||
print("$" + tempCost, "and", tempHours, "hours per week")
|
||||
print(fgColor.GREEN,"$" + tempCost, "and", tempHours, "work hours per week",fgColor.NC)
|
||||
|
||||
tempCost = format((cost * packs * 365)/12, '.2f')
|
||||
tempHours = calcHours(tempCost)
|
||||
print("$" + tempCost, "and", tempHours, "hours per month")
|
||||
print(fgColor.GREEN,"$" + tempCost, "and", tempHours, "work hours per month",fgColor.NC)
|
||||
|
||||
tempCost = format(cost * packs * 365, '.2f')
|
||||
tempHours = calcHours(tempCost)
|
||||
print("$" + tempCost, "and", tempHours, "hours per year")
|
||||
print(fgColor.GREEN,"$" + tempCost, "and", tempHours, "work hours per year",fgColor.NC)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user