4/19 I don't know what is wrong..pls help


def power(base,exponent):
result = base**exponent
print "%d to the power of %d is %d." % (base, exponent, result)


my code is there..

Everytime I click save&submit code button
it says
error: Oops, try again. Your output looks a bit off. Did you raise 37 to the power of 4?
What should I do?


Oh, I solved it.
Actually, I'm South Korean student.
So, I'm using translated site and also code is translated into Korean.
But, code is written in English except the line starting with print.
My original provided code is this :
def power(___, ___): # 여기에 매개변수를 추가하세요!
result = base**exponent
print "%d 의 %d 제곱은 %d 입니다." % (base, exponent, result)

power(,) # 여기에 인자를 추가하세요!

only one line of Korean.. after I changed Korean part into English, IT WORKS.
I wonder what's the difference between Korean and English.
Thank you guys for reading this long article


A normal python string uses ASCII encoding. That means not all characters can be used. To use other characters you can use a unicode string.

unicode_string = u"%d 의 %d 제곱은 %d 입니다." % (base, exponent, result)

Note the u in front of the first quotation mark.


I need a bit of help in 4/19
It keeps saying syntax error but i don't know the error.
pls help :frowning:


Show us a screenshot of your code so we may help