User input | SoloLearn: Learn to code for FREE!

+3

User input

In python , how do you do user input ? So say You input a number for x. And then that number is used later on. I know how to in the coding section of the program , you’d do x = whatever . But I want it to come up when I press run it says input number x =

1/31/2018 10:10:03 PM

Alex Herbert

5 Answers

New Answer

+1

Thanks that’s what I needed! Now , is only way of inputting the info at the start of the program on the pop up box?

+4

SoloLearn uses Python 3.

+2

To do that you would need this code: x = input(“Input a number”) print(“x = “, input) #Run: Input a number: 7 #Outputs x = 7

+2

Yeah, if you get the official python download on your computer it will just come up as words with no box that’s just how sololearns code playground makes you input

0

Okay, that’s a shame but I can work with that. If I was going to download on my computer what version does SoloLearn use? So I know which one to get.