Skip to content

Instantly share code, notes, and snippets.

@NurseLaura
Created October 6, 2016 18:13
Show Gist options
  • Save NurseLaura/b6b35b45cdda75c24a457cd732b645b4 to your computer and use it in GitHub Desktop.
Save NurseLaura/b6b35b45cdda75c24a457cd732b645b4 to your computer and use it in GitHub Desktop.
def calculate_tax(items):
tax_total = 0
for item in items:
print(item)
tax = item * .07
print(round(tax, 2))
tax_total += tax
return('Tax Total : ' + str(tax_total))
items = [1.99, 2.49, 2.99, 3.49, 3.99, 4.49, 4.99]
calculate_tax(items)
print(calculate_tax(items))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment