KeyError in Python | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

KeyError in Python

A wrote this code a while back and I have just noticed that I get an error if my input starts with j. I am not sure why. Could anyone explain what is going on? Thanks https://code.sololearn.com/cihR795ohx2S/?ref=app

17th Mar 2018, 1:24 PM
cyk
cyk - avatar
3 Answers
+ 8
you are missing a key: value pair in the "worth" dictionary for 'j'
17th Mar 2018, 1:32 PM
Burey
Burey - avatar
+ 6
xD
17th Mar 2018, 1:43 PM
Burey
Burey - avatar
+ 2
So dumb!!!! Thanks a ton
17th Mar 2018, 1:34 PM
cyk
cyk - avatar