I'm new to coding, but i'm trying to do this excercise from a website, which tells you to print how many 7's are in the number 999 to the power of 999, but my code just prints 0. what's wrong?
Code:
x = 999**999
summa = 0
s = str(x)
for i in range(0,len(s)):
if s[i] == 7:
summa = summa + 1
print(summa)
Last edited: