- 3

In Python Language "input Function" isn't work Please tell me How to write input Function in Python in SoLo Larn App

20th Jun 2020, 11:58 AM
DEVARSH PANCHAL
DEVARSH PANCHAL - avatar
30 Answers
+ 2
Hey Taking Input And Presenting Your Output After Performing Operations On Your Input Is The Major Task. You Can Take Input- x=input() In Above Statement Input is a predefined FunctionWhich Will Take Input From You And Store It In The Variable Called x. Now If You Want To Perform Formatting Or By Default Your Input Is In String Format So If You Want Your Input in integer or floating point format then you have to perform formatting. x=int(input()) - This Statement First Ask For Input As String Then Change It’s formatting from str to int and then assign it to variable called x. Same You Can Perform For Floating Point Numbers. x=float(input()) - This Statement First Take Input As String Then Typecast It To float and then Assign It To x. May Be This Explanation Helps You 😊
21st Jun 2020, 6:12 PM
Rahul Saxena
Rahul Saxena - avatar
+ 8
DEVARSH PANCHAL, this is not the way sololearn is working. It is a "self-learning" platform, that means that the user has to take stuff like tutorials, code challenges and so on, and work through them. And he is responsible for his own growing progress in learning. If the user stuck somewhere in this process, he is free to ask the great sololearn community. So in your case : Go through the necessary tutorials and do exercices to get familiar with all these things. Then you don't need to ask how to add two numbers or other very basic staff. Thanks!
20th Jun 2020, 12:36 PM
Lothar
Lothar - avatar
+ 3
U only enter the number if u want to print it u should do this print(n1) Beacause input function take a value form the user only not print it on screen DEVARSH PANCHAL
20th Jun 2020, 12:12 PM
Muhammad Galhoum
Muhammad Galhoum - avatar
+ 3
num1=int(input("pls enter first number ")) num2=int(input("pls enter second number ")) print(" the first number is "+num1) print("\n") print("the second number is "+ num2) DEVARSH PANCHAL
20th Jun 2020, 12:25 PM
Muhammad Galhoum
Muhammad Galhoum - avatar
+ 3
He is a begainner person will not know the format function Granger thats for u num1=int(input("pls enter first number ")) num2=int(input("pls enter second number ")) print(" the first number is {} ".format(num1)) print("\n") print("the second number is {}" .format(num2))
20th Jun 2020, 12:35 PM
Muhammad Galhoum
Muhammad Galhoum - avatar
+ 3
#I think u want to write this For nums X = int(input( )) For str X =str(input( )) or X= input(" ")
21st Jun 2020, 2:52 PM
Bruklin
Bruklin - avatar
+ 2
You're welcome ☺️☺️ DEVARSH PANCHAL
20th Jun 2020, 12:14 PM
Muhammad Galhoum
Muhammad Galhoum - avatar
+ 1
Please show your code ☺
20th Jun 2020, 12:00 PM
Sousou
Sousou - avatar
+ 1
when it comes to numbers you should use infront of input and try it again
21st Jun 2020, 5:50 PM
Ravi Teja
Ravi Teja - avatar
0
print ("Enter your number") n1= input()
20th Jun 2020, 12:02 PM
DEVARSH PANCHAL
DEVARSH PANCHAL - avatar
0
And When i enter the number Only print Function work
20th Jun 2020, 12:04 PM
DEVARSH PANCHAL
DEVARSH PANCHAL - avatar
0
Thanks
20th Jun 2020, 12:13 PM
DEVARSH PANCHAL
DEVARSH PANCHAL - avatar
0
i can't understand properly please write a code
20th Jun 2020, 12:15 PM
DEVARSH PANCHAL
DEVARSH PANCHAL - avatar
0
thanks
20th Jun 2020, 12:17 PM
DEVARSH PANCHAL
DEVARSH PANCHAL - avatar
0
And Please Tell me How to add tow number in Python Please write code
20th Jun 2020, 12:21 PM
DEVARSH PANCHAL
DEVARSH PANCHAL - avatar
0
A = input ("what is your name?: ") print (f"hello {A}") Try something like this
20th Jun 2020, 9:11 PM
Adeboye Daniel
0
Ich habe ein code
21st Jun 2020, 2:26 PM
a. b. c a. b. c
a. b. c a. b. c - avatar
0
No, unfortunately not. In sololearn playground you have to enter all needed inputs before any action is possible.
21st Jun 2020, 6:01 PM
Pritam Ghosh
Pritam Ghosh - avatar
0
Can someone tell me a few of there programing proyects with our love Python?
22nd Jun 2020, 2:04 AM
edreack
edreack - avatar
0
Use num=int(input("enter the number")) print(num)
22nd Jun 2020, 3:32 AM
Abhishek Kumar
Abhishek Kumar - avatar