Skip to content

Instantly share code, notes, and snippets.

@Shogun89
Created June 23, 2019 21:50
Show Gist options
  • Save Shogun89/65b3a4d050f90572325096fe5bc5fa3e to your computer and use it in GitHub Desktop.
Save Shogun89/65b3a4d050f90572325096fe5bc5fa3e to your computer and use it in GitHub Desktop.
days = ['Monday', 'Tuesday', 'Wednesday','Thursday', 'Friday','Saturday','Sunday']
food_count = 0
gas_count = 0
for d in days:
f = input("Please enter the amount spent on food on {day}:".format(day = d))
g = input("Please enter the amount spent on gas on {day}:".format(day = d))
if (float(f) >= 20):
food_count += 1
if (float(g) >= 20):
gas_count += 1
print("# of days for food over $20 : {f_c}".format(f_c = food_count))
print("# of days for gas over $20 : {g_c}".format(g_c = gas_count))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment