← Practice
πŸ“– Your first programLearning path
Browsing as guestΒ·Sign in or create a free account to save progress and use tutor tools.
LessonΒ·difficulty 1/5Β·~6 min

Say your name

Text in Python is called a string. You can glue strings together with + to build a bigger sentence:

python
food = "samosa"
sentence = "I love " + food
print(sentence)   # I love samosa

Your task

  1. Set name to your name (any non-empty text in quotes).
  2. Build a variable intro that joins the text "Hi, my name is " with name, using +.

The samosa example above shows the exact move β€” now write your own two lines the same way (your name, then glue it on with +), and print(intro).

Mind the space after is inside the quotes β€” without it you'd get Hi, my name isSam. Strings join exactly as written.

Tests

  • you picked a name
  • intro starts with the greeting

✦ Stuck? Ask for a spark

Sign in or create a free account to use your monthly AI explainer allowance.

warming up
Loading editor…
Consolewaiting

$ Console output will appear here.

>_AI coach
Sign in or create a free account to chat with the tutor.