Input function in python | SoloLearn: Learn to code for FREE!

+1

Input function in python

How to show the instruction for user to input?

5/25/2020 2:53:35 AM

Ivan Ong

13 Answers

New Answer

+2

David Ashton , Ivan Ong wants to say that, when he uses the input("your name") function, he expects a pop up box asking name......but in sololearns app, the pop up box displays: "Split input in multiple lines"

+6

Ivan, your profile indicates you have completed almost half of the Python course. Is there a particular issue that is not explained in the lessons? Please clarify your question so we can help.

+4

Every pro was a noob, my friend!! Just continue learning!!

+4

You have no choice to change the heading in sololearn but in other software like python idle it displays the input heading.

+2

Ivan Ong Sololearn doesn't support this feature to show the msg before input You can use Pydroid3 or Qpython for it Take a look here , I've made for you 👇👇👇 https://www.sololearn.com/post/419947/?ref=app

+1

In the course, it just show a pop up n the instructions i put is part of the variable. Meaning when i print(s), it will show Pls name Ivan instead of just Ivan

+1

I hope this is what you are looking for. I don't understand what you are looking to do. https://code.sololearn.com/csYr5MjH304a/?ref=app

+1

The pop up windows doesnt show the instruction i want to show. "Pls Name" Otherwise, how user will know what to key? Any better idea to do it??

+1

If you mean when you execute the code for example name = input ("Your name") Your name is not shown, it is because the SoloLearn CodePlayground works that way. If you need multiple entries for example: age = input ("Your age") You need to put in the entrance: Ivan -> press enter 30 - -> Run

+1

Bingo.... sorry for being a noob while trying to learn python.

+1

assume you want the program to prompt the user to enter name,the code is as follows; name =input ("Enter name" ")

+1

Code syntax be user_input=input("instructions") Bro for your given *tags code be: s=input("pls your name")

0

Input() returns the entered value as a string. If you want to take input a number and want to perform mathematical operation, you will have to use typecasting also. input_var = input("Enter your name : ") print("\nName is : " + input_var) num = int(input("Enter integer and get its twice : ")) print("\nOutput is : ", num*num)