CodingNeed.

1 · First steps · 6 MIN

Your first instruction

A program is a sequence of instructions.

Python executes statements in order. print displays text inside matching quotes. A function begins with def, uses a colon, and indents its body. return passes a result back to the caller.

A recipe has separate steps. A program works the same way: start with one clear instruction.

Read the example

print("Hello, learner!")
Check the expected output
Hello, learner!

Your challenge

Write solve(input) to return a greeting for any name: "Hello, " followed by the name and "!". Return the string instead of logging it.

Common trap

Text needs matching quotes. Python uses indentation to group instructions.

Next lesson: Give values a name