0
How do I make the input function work of python 3 work in this app, when writing code in the code section ?
6 ответов
+ 3
x = input()
print(x)
You might wish to review the start of your python course
+ 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)
+ 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.
+ 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
0
Thank you very much
0
😁👍