+ 1

For loops question

Hello, in the code I attached, I had typed in a for loop but it returned no result, I am trying to make a base 6 calculator for the number 12345 so it's 1*6^4 + 2*6^3 + 3*6^2 + 4*6^1 + 5*6^0 which is 1865 the problem is the for loop I made returned no output, and also what is the way to sum all of the output numbers in a for loop? Thank you for answering https://code.sololearn.com/cOcxCat0g12u/?ref=app

27th Jul 2019, 4:28 PM
Steven Sim
Steven Sim - avatar
3 Answers
+ 3
Please look at the code. Hope it helps you 😉. First problem is that you don't store anywhere the value of the sum. And second is print the result. https://code.sololearn.com/c8j7M50RdvAv/?ref=app
27th Jul 2019, 4:34 PM
TheWh¡teCat 🇧🇬
TheWh¡teCat 🇧🇬 - avatar
+ 2
Steven Sim you are welcome 😉
27th Jul 2019, 4:38 PM
TheWh¡teCat 🇧🇬
TheWh¡teCat 🇧🇬 - avatar
0
TheWhÂĄteCat Thank you very much :)
27th Jul 2019, 4:37 PM
Steven Sim
Steven Sim - avatar