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

3 Likes

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!

2 Likes

n=“hello world”
print(n)

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

@IsaacG

We recently modified the test runner and tests for this exercise on the Python track.
Using print() in the UI without a function definition should give the following result:

Using print() instead of return inside the function should give the following result:

Open to feedback on message tweaks, although I don’t want to be too verbose, since it requires manual updates.

3 Likes

Hola un gusto saludarlos, soy nuevo y estoy atascado en Hola,mundo, he intetado y he buscado tutorial y me sigue saliendo error en todo momento.
Me podrian ayudar por favor.

It is good to show your code when reporting a problem like this. Then we might see why it is that you are stuck.

Sorry, my Spanish is not very good. Perdón por mi español, no es tan bueno.

Hola un gusto saludarlos, soy nuevo y estoy atascado en Hola,mundo, he intetado y he buscado tutorial y me sigue saliendo error en todo momento.
Me podrian ayudar por favor.

Consider using the “Request Mentoring” button. That allows a mentor to assist you and allows the mentor to see what code you wrote. Being able to see the code is extremely useful to figure out what is wrong.

Considere usar el botón “Solicitar tutoría”. Eso permite que un mentor lo ayude y le permite ver qué código escribió. Poder ver el código es extremadamente útil para descubrir qué está mal.

For the Hello World exercise, it is not one that you can request mentoring on. It is the exception.

hola, alguien me ayuda con el código de “hola, mundo” ? ya intenté de muchas formas y no logro corregir el error.