What's the problem with the dictionary? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
30th Jan 2018, 7:35 PM
Raphael Shay
Raphael Shay - avatar
2 Answers
+ 4
First, you are trying to use the randint function from the random library. The thing is, you forgot to actually import it into your code. You should add this as your first line: import random Next, its freaking out because you indented your dictionaries weirdly, so just remove the indents at the start of your code and it should work better. Hope this helped!
30th Jan 2018, 7:40 PM
Faisal
Faisal - avatar
+ 3
Thanks! And oops I forgot to add import random..
30th Jan 2018, 7:41 PM
Raphael Shay
Raphael Shay - avatar