Stuck on Python Hello World

Im doing python track but in the “hello world” task it just give me this:

ImportError while importing test module '.mnt.exercism-iteration.hello_world_test.py'.
Hint: make sure your test modules.packages have valid Python names.
Traceback:
.usr.local.lib.python3.10.importlib.__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
.mnt.exercism-iteration.hello_world_test.py:3: in <module>
    from hello_world import (
E   ImportError: cannot import name 'hello' from 'hello_world' (.mnt.exercism-iteration.hello_world.py)

Hello, it would help if you posted the code you tried to run.

However, it’s also worth noting that Exercism is not for total beginners so if you’re new to coding, it won’t work for you. However, our new “Learn to Code” site will launch next year and there will be a waiting list starting soon, so please look out for that.

If you’re not a beginner and are coming to Python from a different language, post your code and someone will help! :)

1 Like

Scratch is pretty good at givning the basics of programming.

ImportError: cannot import name 'hello' from 'hello_world'

The exercise stub (hello_world.py) had a hello function definition. The test is attempting to import that function but cannot find it. Either it was removed, renamed, or has invalid syntax. The solution ought to contain:

def hello():
  ...

hello i’m Erfan
i have a problem in hello world , please help me

hello please help me . i have a problem in hello world.
def hello():
print (“hello_world”)

i don,t know where the problem is.

Did you watch the video on that page? It should explain things.