Hello, Python
Welcome. Python runs your instructions top to bottom, and the friendliest first instruction is print(). It shows a value on the screen.
print("Hello, world!")Text wrapped in quotes is a string. You can store a string in a variable using =, then reuse it as many times as you like:
name = "Ada"
print(name) # AdaAn f-string (note the little f right before the opening quote) lets you drop a variable straight into text using {curly braces}:
name = "Ada"
print(f"Hello, {name}!") # Hello, Ada!Anything after a # is a comment. Python ignores it. It is just a note to humans reading the code.
Create a variable name set to any name you like, then print exactly Hello, <name>! using an f-string.
This lesson is locked
Lessons open one at a time. Finish the previous lesson to unlock this one.