5.int()'s Second Parameter



Lesson Error:
"Oops, try again. Your code looks a bit off (pun super intended)--it threw a "maximum recursion depth exceeded while calling a Python object" error. Check the examples in the editor if you need help!"

Print Window Error:
Traceback (most recent call last):
File "python", line 5, in
File "python", line 3, in bin
File "python", line 3, in bin (this line repeats)
RuntimeError: maximum recursion depth exceeded while calling a Python object

I don't know what is wrong with line 3, given that was supplied for the lesson. Can't figure out how to make this work.

print int("1",2)
print int("10",2)
print int("111",2)
print int("0b100",2)
print int(bin(5),2)
# Print out the decimal equivalent of the binary 11001001.
print int("11001001",2)


Tough to say. The code runs fine for me. Try a page refresh and submit again.


I removed the lesson generated print statements and ran only my portion and it worked fine. I'm getting the same error on the next lesson (6. Slide to the Left!...) and there isn't even any code on Line 3.


(also the page refresh ended up fixing it.) thank you!


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.