+ 3
How does input()/raw_input() work in Python 3?
I took the Python course over the span of a couple of days, but I didn’t understand a lot of it: including how to get people to input text into a game. I’ve done a ton of research, but I can’t figure it out. I even tried searching through the course again, but I didn’t find anything helpful. For a clearer example: I watched this one person on YouTube use “answer” instead of “txt” [answer=Input()]. I’ve tried both and neither of them work.
5 Risposte
+ 4
🤔
What's the code you're trying to run?
+ 3
If I understand your question correctly, could it be because you're capitalizing the input() function? Python is case sensitive, so for it to work you must use input() rather than Input()
+ 3
no, that’s not it. I have input written at lowercase. This forum just kept trying to capitalize input for some reason. I tried to fix it but I stopped trying.
+ 3
ok. wow. never mind. I forgot that I set the code playground to swift because I wanted to get back into learning Swift. Then I tried coding in Python. That’s the problem.
0
input is for version 3.6.5 but raw input for version 2.7.5