+ 1
Input
How do u take input from user in python ? because when I write name =input ("enter ur name") it shows error
12 Réponses
+ 3
It still does not work 😭
+ 2
The input function accepts prompts from the person writing the code(you). So the prompt in your code should be written as:
name=input("enter ur name: ")
The space between the colon and the closing quotation mark is meant for the input from anyone.
+ 2
I have a question i would be very grateful if u help can u tell me what to type when the app says looks like ur program needs input ( split multiple inputs into separate lines ?)
+ 2
Actually I can use input function and make program easily in school but some how it's asking this here 😭
+ 2
No after I hit the run button it says split multiple inputs into separate lines and ur program needs input
+ 2
I actually posted it on my activity can u visit it any give me suggestions 🥺😭
+ 1
Can you attach your code and update your tags to something meaningful as per the following guides:
https://sololearn.com/compiler-playground/W0uW3Wks8UBk/?ref=app
https://sololearn.com/compiler-playground/Wek0V1MyIR2r/?ref=app
https://sololearn.com/compiler-playground/W3uiji9X28C1/?ref=app
What you've written above looks fine, but it should be written
name = input("enter your name")
+ 1
The Sololearn compiler only takes input after you hit that run button. So, if you want to have multiple inputs, you have to put each input on a new line.
The compiler/interpreter at school would be able to accept real-time input.
0
Please share your code
0
It works. It just doesn't output anything.
Do you need print(name)?
If you want the name to appear in a new line, I would update your first line to:
name = input("enter ur name: \n")
\n is what we call an escape character for a new line.
0
Yes, that's what I'm talking about.
When you hit run, that pop up is where you write your input.
So;
Hit run
Write your name
Hit Submit
Done