0

Code coach problem running code

I wrote some python3 code for a code coach problem in the Code Playground first. The program worked fine there. I copied and pasted it into code coach and now I get an error 'Traceback (most recent call last): File "/usercode/file0.py", line 9, in <module> qty_available_agents = ' I used the input from the test case in my code in the Code Playground with no problem. It sems as if my code is OK in one place but not the other. Any ideas what the issue could be?

18th May 2020, 11:30 PM
GeoK68
GeoK68 - avatar
6 Answers
+ 5
you probably forgot to add the inputs properly but i can't quite tell without an example of the code
18th May 2020, 11:40 PM
Sebastian Pacurar
Sebastian Pacurar - avatar
+ 4
you need three inputs there: Input Format Your input will be a string of your name, then an integer of the number of available agents, and lastly a string of the other four names separated by spaces. Sample Input 'Eric' 2 'Adam Caroline Rebecca Frank'
18th May 2020, 11:47 PM
Sebastian Pacurar
Sebastian Pacurar - avatar
+ 3
đŸ€” I think you should share your code with us
18th May 2020, 11:32 PM
Ayush Kumar
Ayush Kumar - avatar
+ 3
Aggred with Sebastian Pacurar and infact you are not taking input at all because the same variable which you are using for input is assigned to a new value . Then where is the use of input ?
18th May 2020, 11:49 PM
Ayush Kumar
Ayush Kumar - avatar
+ 1
Yes, the inputs were not added properly. I rewrote the code with three different inputs and it worked. In the future I will have to pay more attention to the inputs. Interestingly, I received the error the first time running the program after pasting the updated code from the Code Playground. Thank you for your help.
19th May 2020, 12:24 AM
GeoK68
GeoK68 - avatar
0
I just made it public in Code Playground: My code 2020/05/18 17:41 New Drivers License
18th May 2020, 11:45 PM
GeoK68
GeoK68 - avatar