Stuck on hello world

Please I have been unable to write my first “Hello,World!” in the python dashboard, I am a new beginner and I have followed all the instructions to the best of my knowledge but it is still returning error messages, please how do i go about this, thank you.

Hi @Godsonike - firstly, welcome to the Exercism Forum - my name is Jonathan and I’m the Community Manager at Exercism :slight_smile:

I’m sorry you’re having issue with the first exercise. Exercism is more generally geared towards those with a bit of prior coding understanding so I would highly recommend checking out CodeAcademy to get a sense of the basics, and then come back to Exercism.

We are developing a ‘Learn to Code’ platform next year that I can keep you posted about if you would like?

J

Hi, I’m facing the same issue and it’s disappointing since it actually works on python but doesn’t work on the exercism platform.

def hello():
return ‘Goodbye, Mars!’
print (“Hello, World!”)

This exercise asks that you implement a function which returns the string “Hello world”.

3 Likes

Thank you @IsaacG
That worked. the instructions aren’t clear. It doesn’t clarify “return” anywhere. it just says “say “Hello, World!””

Here’s the answer to it:
def hello():
return ‘Hello, World!’

The instructions say (emphasis mine)

Modify the provided code so that it produces the string “Hello, World!”.

Also, looking at the tests themselves (here in hello_world_test.py) would be good habit.

The failing unit tests ought to indicate that the function was called and it expected “X” to be returned but it got “Y”.

1 Like

Hello! I didn’t get it ‘-’

1 Like

You are printing a string when the function should return a string.

2 Likes

Thank you!

1 Like