0
raw_input name error
I posted my pythonslots code, but it won't run because it says raw_input has not been defined. I thought it was a standard library function. Do I need to do something special to make my code run in the code playground?
7 ответов
+ 6
in python3 raw_input() was renamed as input()
so change raw_input() by just input()
+ 5
yes, playground have this unexpected way of taking input,
pass all your inputs separated by single lines in the only prompt appear (total number of lines = no of times your code is expecting the input)
example if your code is expecting 3 inputs,
then input should be as follows:
input1
input2
input3
I hope this solves your problem.
+ 5
nope
there isn't in the playground.
+ 5
your welcome ☺️
0
changing raw_input() to input() got rid of the name error, but sololearn code playground doesn't seem to handle the input request very nicely. I have two lines containing input () and one of those is in a loop but it only prompts for input once when "Run" is pressed. Is this a limitation of sololearn? Or am I still doing something wrong? It's the only code I've posted if you wanna check it out.
0
so there is no way to handle infinite inputs, say for like a game?
0
Bummer. Thanks for your answers, though! Very helpful!