Exercise: Hello World
Leer en Español | Solve Online
Background/Motivation
In the long history of computer science, the "Hello World" program is the traditional first step for anyone learning a new language or exploring a new environment. Its purpose is simple: verify that you can correctly write code, run it, and see the expected output. In The Gymnasium, this exercise also ensures you understand how to use the SUBMIT flag.
The Task
Implement a function hello_world() that returns the exact string "Hello, World!".
Specifications
- Function Name:
hello_world - Arguments: None
- Return Type:
str - Expected Output:
"Hello, World!"
Constraints
The output must match exactly, including capitalization and punctuation. No extra whitespace should be present.
Example
Instructions
- Open
exercises/hello_world/solution.py. - Implement the
hello_worldfunction. - Change
SUBMIT = FalsetoSUBMIT = Trueat the top of the file when you are ready to be graded. - Run
python solution.pylocally to verify your solution with the built-in self-tests.