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

460 points
511018769d2ff4aa9a000fd4_318075838
Submitted by
Parvati Inashes
over 4 years ago

Oops?

What is wrong with my syntax?
answer = "C"


6 votes

permalink

It worked for me:
answer = str("C")

1055 points
C11963a8b9d157ff7cd60fab76ad736a?s=140&d=retro
Submitted by
rafa.bench
over 4 years ago

5 Comments

511018769d2ff4aa9a000fd4_318075838 Parvati Inashes over 4 years ago

Ah, thank you. I guess I need to take a python intro course before trying this lesson.

De461876dbabc21ea8a96a03fce0d23a?s=140&d=retro Lyndsy Simon over 4 years ago

If you want to add me as a collaborator, I'd be happy to fix it.

8b602335fbca0eda4314d26f80c70028?s=140&d=retro Joshua Druce over 4 years ago

Shouldn't "C" already be a string? From the interrupter "c" == str("c") evaluates to True

Picture Filip over 4 years ago

Duh, that's stupid! Thanks a lot for the tip!

6906320db6b7a1b3d083a348d7c20b99?s=140&d=retro xbaboon over 4 years ago

Especially as the hint tells us to enter it in the format 'answer = "D"' and not str("D")


2 votes

permalink

Yeah I think something is broken here with the evaluator. My answer was also only accepted after I placed a string with the correct answer into a string function, i.e. str("string"). Seems pretty redundant to me.

1487 points
503969e0d7666b000200e7dd_165016545
Submitted by
Jeremy
over 4 years ago


1 vote

permalink

ya i am also getting the same issue....

414 points
6ad1befe18e64963f81262a07a6d590c?s=140&d=retro
Submitted by
keeprocking
over 4 years ago


1 vote

permalink

try it in lowercase like this

answer = "c"

420 points
66def209d1c1ee67bc6c5aca0347c88e?s=140&d=retro
Submitted by
miladm_537a69bf548c357ee2000edd_dele
almost 3 years ago

1 Comment

66def209d1c1ee67bc6c5aca0347c88e?s=140&d=retro miladm_537a69bf548c357ee2000edd_dele almost 3 years ago

yeah mabey


0 votes

permalink

"C" should work (and working for me!)

584 points
Cb8b2868b7e73310dfa1554ea68e9162?s=140&d=retro
Submitted by
Kartik Mistry
over 4 years ago