Consecutive Powers code inop | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
0

Consecutive Powers code inop

Good evening all. I am working on a consecutive powers code in Python where I must find integers in a range who's numbers to the power of their index + 1 add up to the number itself. Ex: 89 is 8**1+9**2 =89. My code is so close, but I'm stumped bc it won't sum all math, it just returns last exponent! Anyone willing to bother? :D https://code.sololearn.com/c0BJ7S784zYN/?ref=app

6th Aug 2018, 3:38 AM
Davod
Davod - avatar
2 Antworten
+ 1
Here's my solution for it, doesn't happen very often https://code.sololearn.com/c1Xf9F9k2i42/#py
6th Aug 2018, 4:04 AM
JME
0
TY Mr. sir. That was quick 😄
6th Aug 2018, 4:08 AM
Davod
Davod - avatar