+ 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 =

31st Jan 2018, 10:10 PM
Alex Herbert
4 Respostas
+ 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?
31st Jan 2018, 11:21 PM
Alex Herbert
+ 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
31st Jan 2018, 11:17 PM
Ole113
Ole113 - avatar
+ 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
31st Jan 2018, 11:25 PM
Ole113
Ole113 - avatar
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.
31st Jan 2018, 11:26 PM
Alex Herbert