How to make multiple input boxes and give them names | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to make multiple input boxes and give them names

For example i need a code allow the user to input me tow values, temperature and rain, and i need to give evrey input box a name so the user will know wich one is it.

28th Nov 2018, 1:14 PM
Ahmad Ali
Ahmad Ali - avatar
3 Answers
+ 7
I'm afraid that's not possible, you see, most online compilers works like the Playground, collect all inputs and code to be sent to the server to be processed. After the process completed the output is sent back to you despite it was a success or failure. You might wanna look for mobile apps that can support offline interactive processing though, or install an IDE that supports Python on your PC/Laptop, that would be more convenient : )
28th Nov 2018, 1:34 PM
Ipang
+ 3
You have more flexibility to do this with the web codes in Playground. For Python, all inputs must be provided ahead of time - one input per line. It helps if you place your input descriptions as comments at the top of your code so ppl can quickly see what they need to enter.
28th Nov 2018, 1:43 PM
David Carroll
David Carroll - avatar
+ 1
Usually start your code by adding input so other people can add thier input and you can write your code to do something with thier input
17th Jan 2019, 8:33 AM
Markpeach96
Markpeach96 - avatar