+ 1

Input

How do u take input from user in python ? because when I write name =input ("enter ur name") it shows error

1st May 2024, 3:29 PM
Kinjal
Kinjal - avatar
12 Respuestas
+ 3
It still does not work 😭
19th May 2024, 3:35 PM
Kinjal
Kinjal - avatar
+ 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.
2nd May 2024, 4:04 PM
Sage Starr
Sage Starr - avatar
+ 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 ?)
22nd May 2024, 1:27 PM
Kinjal
Kinjal - avatar
+ 2
Actually I can use input function and make program easily in school but some how it's asking this here 😭
22nd May 2024, 1:28 PM
Kinjal
Kinjal - avatar
+ 2
No after I hit the run button it says split multiple inputs into separate lines and ur program needs input
23rd May 2024, 5:15 PM
Kinjal
Kinjal - avatar
+ 2
I actually posted it on my activity can u visit it any give me suggestions 🥺😭
23rd May 2024, 5:16 PM
Kinjal
Kinjal - avatar
+ 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")
1st May 2024, 3:40 PM
Ausgrindtube
Ausgrindtube - avatar
+ 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.
22nd May 2024, 5:10 PM
Ausgrindtube
Ausgrindtube - avatar
0
Please share your code
19th May 2024, 5:43 PM
Ausgrindtube
Ausgrindtube - avatar
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.
21st May 2024, 6:46 AM
Ausgrindtube
Ausgrindtube - avatar
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
23rd May 2024, 6:40 PM
Ausgrindtube
Ausgrindtube - avatar