0
How may I input numbers in this code to be add up (sum) ?
Recently I started learning Python, would you please let me know how may I input numbers to be be Add up (sum) in this code ? I use Spyder IDE , in IN/OUT page (in IPython part) may I input various numbers ? how ? https://code.sololearn.com/cIhzfUug0H5v/?ref=app
3 Réponses
+ 1
https://code.sololearn.com/cQ10zXrDacp4/?ref=app
+ 1
solved 👍
0
so far, you only defined a function to calculate the sum. now you need to call the function, for example like this:
my_sum=_find_sum_sample_([1,2,3,4,5])
print(my_sum)
just add these two lines at the end of your code, and 15 will be the output, because the list [1,2,3,4,5] is given as input. you can input any other list that you like instead 😊