Created
June 23, 2019 21:44
-
-
Save Shogun89/32ce8fbc152622813b130a448b1419ed 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 = [] | |
gas = [] | |
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)) | |
food.append(f) | |
gas.append(g) | |
food = list(map(float, food)) | |
gas = list(map(float, gas)) | |
num_food = len(list(filter(lambda x: x >= 20, food))) | |
num_gas = len(list(filter(lambda x: x >= 20, gas))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment