Step: print() and variables

print() and variables

print() writes text to the console, and an f-string (f"...") lets you drop a variable straight into a string with {name}.

Why it matters: print + f-strings are how you'll check your work in every step of this tutorial.

Example: with name = "Ada", f"Hi {name}" becomes "Hi Ada".

Your turn: print a greeting using the name variable above.

Pitfall: forgetting the leading f means {name} is printed literally instead of being substituted.

Setup:
name = "Ada"
Your code:
Expected output:
Hello, Ada!
Step 1 of 18