pyPython Practice LabFrom first print to final round
PYTHON PROBLEM 002 · Starter

Create a personal greeting

Generate a friendly greeting for a learner joining a Python class.

strings · f-stringstringsf-string
PROBLEM OVERVIEW

What this Python exercise asks you to practise

This scenario tests create a personal greeting. It belongs to the Python Foundations roadmap and uses the strings · f-string pattern.

Programs, values, variables, input(), print(), and basic type conversion.

INPUT FORMAT

Program input

A person's name on one line.

VERIFIED SAMPLE CASES

Input and expected output

Normal case

Generate a friendly greeting for a learner joining a Python class.

Sample input
Asha
Expected output
Hello, Asha!

Why: An f-string inserts the value of name inside a readable message.

Boundary or variation

Greet a participant whose full name contains a space.

Sample input
Ravi Kumar
Expected output
Hello, Ravi Kumar!

Why: An f-string inserts the value of name inside a readable message.

PYTHON SOLUTION

Reference answer with explanation

name = input()
print(f"Hello, {name}!")

An f-string inserts the value of name inside a readable message.

Common beginner check: Forgetting that input() returns text, even when the user types a number.

READY TO PRACTISE?

Open the guided learning workspace

Trace the logic and reveal the line-by-line explanation. The browser compiler unlocks with complete access.

Open problem 2
SKILL TO CARRY FORWARD

Pattern relevance

This exercise strengthens strings · f-string. Be ready to explain the input, the rule, the boundary cases, and why the chosen approach is appropriate.