lists project on python | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
0

lists project on python

im stuck on the lists project "sum of consecutive numbers" i dont know how to add each number from the list together

12th Sep 2021, 3:51 PM
Harry Francis
Harry Francis - avatar
2 Antworten
+ 1
A =[1,2,3] print(sum(A)) You can use sum function. Or, Sum =0 for num in a: Sum+=num print(Sum)
12th Sep 2021, 4:42 PM
Iftekhar Ahmed Pranto
Iftekhar Ahmed Pranto - avatar
0
where's your code?
12th Sep 2021, 3:52 PM
Rellot's screwdriver
Rellot's screwdriver - avatar