Input | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

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 Thakur
Kinjal Thakur - avatar
2 Answers
+ 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
+ 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