LessonΒ·difficulty 1/5Β·~6 min
Say your name
Read the task β edit your code β Run to see the output β Run tests to check your answer.
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
- Set
nameto your name (any non-empty text in quotes). - Build a variable
introthat joins the text"Hi, my name is "withname, 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
isinside the quotes β without it you'd getHi, my name isSam. Strings join exactly as written.
Tests
- you picked a name
- intro starts with the greeting
β¦ Need help with this task?
Sign in or create a free account to get AI help. Free includes a monthly AI allowance.
warming up
Loading editorβ¦
Consolewaiting
$ Console output will appear here.