0

How do I make the input function work of python 3 work in this app, when writing code in the code section ?

5th Dec 2019, 8:00 AM
Sayed Channoufi
Sayed Channoufi - avatar
6 ответов
+ 3
x = input() print(x) You might wish to review the start of your python course
5th Dec 2019, 8:37 AM
Rik Wittkopp
Rik Wittkopp - avatar
+ 3
When I write an input function and press run, a small window pops up an tells that my program needs input and (spilt multiple inputs into separate lines)
5th Dec 2019, 10:51 AM
Sayed Channoufi
Sayed Channoufi - avatar
+ 2
The input() function works the same way in playground as it would work in any Python 3 program. If you do just like Rik Wittkopp said in code playground, you will see a pop up where a value must be inserted.
5th Dec 2019, 8:48 AM
Gonçalo Magalhaes
Gonçalo Magalhaes - avatar
+ 1
That's right. When you write in the code - input(), you are asking the user to write something which will go within the brackets. When the window pops up, this is the prompt for the user to enter the information which the code will act upon. In the example I gave before: x = input() When you hit RUN, the window will pop up. You could write HELLO WORLD in the window, then hit submit. print(x) will now output the given input and the result will be: HELLO WORLD If you have written multiple inputs in your code, then you will need to provide information for each input on separate lines within the popup window. You can achieve this by hitting enter after each piece of information. Hit submit when you want your code to process your inputs
5th Dec 2019, 6:17 PM
Rik Wittkopp
Rik Wittkopp - avatar
0
Thank you very much
5th Dec 2019, 6:31 PM
Sayed Channoufi
Sayed Channoufi - avatar
0
😁👍
5th Dec 2019, 6:32 PM
Rik Wittkopp
Rik Wittkopp - avatar