Created
June 23, 2019 21:50
-
-
Save Shogun89/65b3a4d050f90572325096fe5bc5fa3e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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