This forum is now read-only. Please use our new forums at discuss.codecademy.com.

How to use APIs with Python Forum

View Course » View Exercise

1857 points
50e63cd1841232744876878acfadd637?s=140&d=retro
Submitted by
sfbillyd
about 4 years ago

Please fix the server side code for 1.3

As other people have mentioned, submitting answer = "C" fails. I tried using answer = str("C") as one person suggested, but no joy.

Something as superfluous as answering a multiple choice question should not fail on the back end. I will proceed with the course, but I hope there are no more pitfalls lurking.

Thanks anyway.


11 votes

permalink

It has to do with the Unicode conversion of the site. Use this:

answer = u"C"

597 points
Picture
Submitted by
Kirk Gleason
about 4 years ago

5 Comments

52100db580ff3348cd00bcf0_675084419 Tom P. about 4 years ago

Yup That did it!

51f0f5b29c4e9d29a900363e_506645404 Arman Talkar about 4 years ago

Thanks! Could you explain why this works?

Picture Kirk Gleason about 4 years ago

It would appear that Codecademy recently converted all of their python to Unicode. So when it is process answers, it is expecting unicode, but the answers aren't always being sent through as unicode.

So what I wrote up there forces the answer variable to be set to unicode, and it magically matches. It comes up in quite a few places in the python modules.

50e63cd1841232744876878acfadd637?s=140&d=retro sfbillyd about 4 years ago

Thanks, Kirk, I was able to achieve the delayed satisfaction of completing the course. I'm still miffed that the kludge is necessary without any hope of resolution until your solution. Thanks!

37619b86352460ca9b5b67d3f1ead55e?s=140&d=retro Elijah Lynn about 4 years ago

Thanks Kirk!!!


8 votes

permalink

I have same problem with @sfbillyd, it's exactly a compiler mistake, please repair this problem soon!

666 points
576443c05917ec66d8000587_544772720
Submitted by
Chien Dang
about 4 years ago

1 Comment

37619b86352460ca9b5b67d3f1ead55e?s=140&d=retro Elijah Lynn about 4 years ago

Use answer = u"C" as mentioned my Kirk Gleason's answer and explanation.


3 votes

permalink

Neither "C" nor str("C") seem to be working for me either.

350 points
528f8604548c351ad0003706_139858454
Submitted by
certified
about 4 years ago

2 Comments

Fe020eb64d42941e0c7d73bad2b70136?s=140&d=retro TIMOTHY HANLEY about 4 years ago

Having same issue on all of the put answer in "string" questions across the site. I just continued the courses to the extent it would let me. Will go back and answer questions later to complete.

37619b86352460ca9b5b67d3f1ead55e?s=140&d=retro Elijah Lynn about 4 years ago

Use answer = u"C" as mentioned my Kirk Gleason's answer and explanation.


3 votes

permalink

Same here. Looking for a way to continue past it but can't find any hint to bypass.

556 points
58a3b6f7854be99ce70001d7_168303918
Submitted by
Matthew Brender Broberg
about 4 years ago

5 Comments

0dcaf0a0a95af16fc6afa55d51148038?s=140&d=retro midfield99 about 4 years ago

On the top of the panel with the instructions, there is a drop down menu labeled 03/04. Click on that and click 4, and you will skip lesson 3.

2ab284ad1611fc758460699cc8058893?s=140&d=retro nikhilv_2007 about 4 years ago

same here

50e63cd1841232744876878acfadd637?s=140&d=retro sfbillyd about 4 years ago

No positive reinforcement for completing an exercise? Perish the thought!!!

58a3b6f7854be99ce70001d7_168303918 Matthew Brender Broberg about 4 years ago

I'm with sfbillyd - if it doesn't say CONGRATS! I feel deflated. Gamification works on me.

37619b86352460ca9b5b67d3f1ead55e?s=140&d=retro Elijah Lynn about 4 years ago

Use answer = u"C" as mentioned my Kirk Gleason's answer and explanation.


1 vote

permalink

I posted this in the Buggy Exercise Group a couple days ago and they've fixed it now.

http://www.codecademy.com/groups/buggy-exercises/discussions/51f05dd652f8634f1d0009bb#response-51f2b5b5631fe90a8e004804

3692 points
55df2afa95e3787b9200005e_359368177
Submitted by
Judy
about 4 years ago

1 Comment

37619b86352460ca9b5b67d3f1ead55e?s=140&d=retro Elijah Lynn about 4 years ago

Very nice, I didn't know there was a Buggy Exercise Group, thanks!


0 votes

permalink

yuppp...i try everything according to the hint but nothing happen

595 points
51e3a211282ae3b2880085ee_167480171
Submitted by
nur azmina binti mohd hisham
about 4 years ago

1 Comment

37619b86352460ca9b5b67d3f1ead55e?s=140&d=retro Elijah Lynn about 4 years ago

Use answer = u"C" as mentioned my Kirk Gleason's answer and explanation.


0 votes

permalink

I get the same problem as everyone else above. Wish this didn't happen.

1319 points
51b9035552f863e331000143_99614535
Submitted by
Miguel Barbosa
about 4 years ago

1 Comment

37619b86352460ca9b5b67d3f1ead55e?s=140&d=retro Elijah Lynn about 4 years ago

Use answer = u"C" as mentioned my Kirk Gleason's answer and explanation.