18.9 - Printing Using f-strings (Formatted Strings)
Enroll to start learning
You’ve not yet enrolled in this course. Please enroll for free to listen to audio lessons, classroom podcasts and take practice test.
Practice Questions
Test your understanding with targeted questions
Write an f-string that incorporates a variable for the user's name.
💡 Hint: Use the format: 'Hello, {variable_name}!'
Create an f-string that shows a score of 100.
💡 Hint: Format it as: 'You scored {variable_name} points!'
4 more questions available
Interactive Quizzes
Quick quizzes to reinforce your learning
What does f-string stand for?
💡 Hint: Remember what the 'f' at the start signifies.
True or False: f-strings can include expressions inside curly braces.
💡 Hint: Think about if you can perform calculations inside an f-string.
1 more question available
Challenge Problems
Push your limits with advanced challenges
Write a function that takes a name and score and returns a formatted string using f-strings.
💡 Hint: Build the function to take parameters and produce output using f-strings.
How would you display a formatted string for age and height (in cm) using an f-string?
💡 Hint: Remember to declare your variables before using them in your f-string.
Get performance evaluation
Reference links
Supplementary resources to enhance your learning experience.