Ask coding questions

← Back to all posts
Only file is running?
pradeepswami (11)

newly created file are not running. only file runs. what is solution?

Answered by TheDrone7 (1895) [earned 5 cycles]
View Answer
TheDrone7 (1895) by default only runs the file. That is why you may be even unable to run it. If you make other files, you can import them into your file to run them. Or the better option would be to put the code that is to be run simply in the file.

mayurkoshti12 (2)


I have two files called and but when I run I am getting the following error:

Traceback (most recent call last):
File "", line 1, in <module>

NameError: name 'test' is not defined

I have just written in file.

Sorry for that but I am a newbie on platform.

TheDrone7 (1895)

@mayurkoshti12 Can you please provide a link to your repl?

mayurkoshti12 (2)


Thanks for interest!

My Apologies! :)

Actually my import syntax was wrong in