๐Ÿ PyQuest๐Ÿš€ First Steps ยท ๐Ÿงฉ f-Strings: Fill in the Blanks
โญ 0 XP๐Ÿ Python is waking upโ€ฆ

f-Strings: Fill in the Blanks ๐Ÿงฉ

Want to mix variables into a sentence? Use an f-string: put an f right before the quotes, then drop variables into {curly braces}:

name = "Zoe"
age = 12
print(f"{name} is {age} years old")   # โžœ Zoe is 12 years old

Python fills in the blanks for you. It even does math inside the braces:

print(f"Next year I'll be {age + 1}!")

Your mission

  1. Make a variable animal (any animal) and count (any number)
  2. Use one f-string to print a sentence like: I saw 7 wolves at the park! โ€” with your animal and number filled in from the variables

Your code

Press โ–ถ Run to see what your code does!