User's input after the program output | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

User's input after the program output

I cannot do the user's input in the Sololearn sandbox. The idea is: the program's output is two numbers (a+b and abs(a-b)). And user should input these two numbers (a and b). My ideas to do this are in the commented block. Please give any suggestions. Thank you. https://code.sololearn.com/cSC6T1xu42Bh/?ref=app

21st Jul 2020, 9:03 AM
Alexander Koval🇧🇾
Alexander Koval🇧🇾 - avatar
3 Answers
+ 1
Granger, initially I did not mean to do 10 times loop, only once. Later I added this loop just for the teachers to generate numerous variants of the task for schoolchildren.
21st Jul 2020, 11:14 AM
Alexander Koval🇧🇾
Alexander Koval🇧🇾 - avatar
+ 1
Also the curious feature of the sandbox: even in the commented box it finds the input(). So I had to add # before input() to hide it completely.
21st Jul 2020, 11:17 AM
Alexander Koval🇧🇾
Alexander Koval🇧🇾 - avatar
0
codemonkey and Granger, thanks a lot. Yes, I supposed the code will be functioning in any IDE. So the principal problem is in the sandbox.
21st Jul 2020, 11:11 AM
Alexander Koval🇧🇾
Alexander Koval🇧🇾 - avatar