+ 1

How to fix this problem?

So when I made a new code I am new to coding and a just made a simple calculator and every time I run the code it pops up an error message. It says “Looks like your program needs input” I don’t know how to fix this problem. Can you please tell me how to fix it?

22nd Sep 2024, 9:03 PM
Carter Baird
Carter Baird - avatar
2 Answers
+ 3
I assume you are running your calculator in the Code Bits playground. When you run programs there that are requesting inputs from users, you have to supply those answers in the box that pops up. All SoloLearn programs that require input need all that input placed in that white box when the program starts. It's NOT interactive. All inputs are put in, then the parameters are passed to your program's standard in as if a user types those responses. You just have to put the answers all in advance. As a calculator, I assume you are asking for "input" for two numbers. Try putting those numbers in that input box. 4 5 Then run it. If you still have trouble, make it PUBLIC and share the link here. We can try to figure out what you're doing.
22nd Sep 2024, 9:09 PM
Jerry Hobby
Jerry Hobby - avatar
+ 1
Thank you! Its annoying how you have to put all inputs in advance.
22nd Sep 2024, 10:47 PM
Carter Baird
Carter Baird - avatar