+ 1

I don't understand how to use the input function

13th Jun 2019, 10:26 AM
Joshua Aning-dei
Joshua Aning-dei - avatar
5 ответов
+ 5
You can use input like this : a=input("Enter any value : ") You can also define the type of input u want For eg : str or int or float Eg : String input a=str(input()) No. Input a=int(input()) Thanks
13th Jun 2019, 10:40 AM
Prince PS[Not_Active]
Prince PS[Not_Active] - avatar
+ 2
I guess you want to use it in python. input() takes user input and returns a string. It has one argument, it will print it on the screen next to the input request. To get an integer input, use int(input())
13th Jun 2019, 10:41 AM
Airree
Airree - avatar
+ 2
Thanks guys
16th Jun 2019, 1:24 PM
Joshua Aning-dei
Joshua Aning-dei - avatar
0
input() is a builtin function, that prints it's argument and returns the characters user typed as a string. I expect you to ask that because you only did not get input work correctly on SoloLearn. In SoloLearn input() does not print anything. in. SoloLearn playgrounds ask the input only once per execution, where line separated inputs are divided to the existing input statements.
13th Jun 2019, 11:19 AM
Seb TheS
Seb TheS - avatar