+ 5

Why this code is an error?(¿Por qué este código es un error?):

https://code.sololearn.com/c1qINhs1rgAQ/?ref=app

4th Dec 2021, 3:01 AM
CGO!
CGO! - avatar
18 ответов
+ 3
I think this is the best way I can make it https://code.sololearn.com/cKUrJu0eYkTr/?ref=app
4th Dec 2021, 4:57 AM
Mafdi
Mafdi - avatar
+ 5
Mafdi, that's the solution of my problem, I was think in that, thank you. By the way, thanks to all(꧁Ankit, Kode Krasher and Elon Yemp #RELOADED#
4th Dec 2021, 1:00 PM
CGO!
CGO! - avatar
4th Dec 2021, 3:16 AM
꧁Ankit Chatterjee[LESS ACTIVE THAN EVER]꧂
꧁Ankit Chatterjee[LESS ACTIVE THAN EVER]꧂ - avatar
+ 4
Because you are giving a list of strings to the sum function.
4th Dec 2021, 4:13 AM
Mafdi
Mafdi - avatar
+ 3
꧁Ankit Chatterjee[LESS ACTIVE THAN EVER]꧂ I want to print the number of the for loop is the sum of all numbers is 14.
4th Dec 2021, 3:14 AM
CGO!
CGO! - avatar
+ 3
Kode Krasher what will I do by show off get followers 😏! after 1 month I will leave sololearn btw, there's no need of show off
4th Dec 2021, 5:16 AM
꧁Ankit Chatterjee[LESS ACTIVE THAN EVER]꧂
꧁Ankit Chatterjee[LESS ACTIVE THAN EVER]꧂ - avatar
+ 3
Kode Krasher i just posted his answer, I guessed what he wanted to do. And Thanks for praising my code. 😐
4th Dec 2021, 5:18 AM
꧁Ankit Chatterjee[LESS ACTIVE THAN EVER]꧂
꧁Ankit Chatterjee[LESS ACTIVE THAN EVER]꧂ - avatar
+ 3
Kode Krasher you are right I am aren't an beginner in python. I just don't complete courses for I come here to code and meet my dear friends, I have Completed python, java , web., lol Happy Coding! 😎👍 I don't like gifts take this return gift 📦 😎👍
4th Dec 2021, 10:37 AM
꧁Ankit Chatterjee[LESS ACTIVE THAN EVER]꧂
꧁Ankit Chatterjee[LESS ACTIVE THAN EVER]꧂ - avatar
+ 3
꧁Ankit Chatterjee[LESS ACTIVE THAN EVER]꧂ I sorry, but I can't modify the range of the code.
4th Dec 2021, 12:52 PM
CGO!
CGO! - avatar
+ 2
What do you want to do in the code??
4th Dec 2021, 3:12 AM
꧁Ankit Chatterjee[LESS ACTIVE THAN EVER]꧂
꧁Ankit Chatterjee[LESS ACTIVE THAN EVER]꧂ - avatar
+ 2
Mafdi is Right. You are giving a list of chars and not a list of digits. Convert the chars in digits Do sum([int(d) for d in list(str(number))])
4th Dec 2021, 7:32 AM
Elon
Elon - avatar
+ 2
5th Dec 2021, 7:28 PM
CGO!
CGO! - avatar
4th Dec 2021, 2:00 PM
Mafdi
Mafdi - avatar
0
Hi
5th Dec 2021, 7:00 PM
Jamil Waheeb