Trouble with automated evaluation

I am having problem with the automated evaluation on some courses while I am able to run the code properly in terminals and other IDEs for both Scala(https://cloudxlab.com/assessment/slide/16/scala/2218/scala-assessment-declare-a-class?course_id=4) and Python tutorials(https://cloudxlab.com/assessment/playlist-intro/50/introduction-to-python). I see that this issue was encountered by others too but I tried to replicate their steps with no luck.

Any suggestions?

Edit 1: Adding screenshots for the errors I am facing