Getting Input (any language) | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Getting Input (any language)

When I test any of my projects with input, it comes up with 'looks like this program needs input'. How can I change this to what I've got in the actual code? Thanks in advance!

7th Nov 2018, 8:25 PM
Eragon1980
Eragon1980 - avatar
9 Answers
+ 3
Eragon1980 Sololean runs console codes server-side in a sandbox(hope sandbox). You _cannot_ get an interactive console as of writing. To enter more than one item, use a newline as a delimiter. You cannot view stdout before the SL pop-up. This is a major point of contention, but SL won't budge. One way around it (for Python) is to download an Android Python interpreter.
7th Nov 2018, 9:11 PM
non
+ 3
Yup. They will not _listen_ when I suggested they ship SL with a console to run stuff client-side. They'd rather bottleneck everything on their servers. Go figure.
9th Nov 2018, 12:07 AM
non
+ 2
Oh yeah that thing, in SL you'll need to provide the input before running the program, since your program are running in SL server and there's no way for us to interact
7th Nov 2018, 9:15 PM
Taste
Taste - avatar
+ 2
A Python Interpreter: What interprets your scripts. For Android: For your phone/tablet (unless you use iOS). Example: https://play.google.com/store/apps/details?id=org.qpython.qpy3
8th Nov 2018, 9:01 AM
non
+ 1
In Java you would use the Scanner class to get input from an user. What language are you coding in?
7th Nov 2018, 8:32 PM
Carlos J. Rodriguez
Carlos J. Rodriguez - avatar
+ 1
I'm not asking how to get input, I've managed to do that. However, it doesn't come up with what's in the line with 'scanner', it comes up with 'looks like this program needs input'. For example, if I use input('hello') (python), it doesn't show 'Hello' it shows the above.('looks like this program needs input').
7th Nov 2018, 8:45 PM
Eragon1980
Eragon1980 - avatar
+ 1
OK thank you for your replies. What's an android python interpreter?
8th Nov 2018, 7:18 AM
Eragon1980
Eragon1980 - avatar
+ 1
Oh OK, so this is outside of SoloLearn?
8th Nov 2018, 6:08 PM
Eragon1980
Eragon1980 - avatar
+ 1
OK thanks.
9th Nov 2018, 7:21 AM
Eragon1980
Eragon1980 - avatar