Created
September 24, 2020 05:40
-
-
Save codetombomb/82186e8fcaa4021f60a832c114f9abba to your computer and use it in GitHub Desktop.
Sum all nums
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
def tally_nums(*numbers): | |
total = 0 | |
for n in numbers: | |
total += n | |
print(total) | |
if __name__ == "__main__": | |
tally_nums(1, 1, 1.3, 4.6) | |
tally_nums(4, 5, 6, 7, 8, 9) | |
tally_nums(40, 55, 60, 75, 80, 95) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment