Last active
April 11, 2021 00:32
-
-
Save ofelix03/2e82518836b0e1c67efee2a530af92f9 to your computer and use it in GitHub Desktop.
summation-using-for-loop-bad
This file contains hidden or 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
| allocation_amounts = [120.0, 320.30, 420.0, 100.0] | |
| total_allocation = 0 | |
| for amount in allocation_amounts: | |
| total_allocation = total_allocation + amount | |
| print("total_allocation: ", total_allocation) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment