Section 1 - Instruction

We've covered a lot, including if/elif/else, logical operators (and, or, not), and nesting conditions!

Engagement Message

Ready to learn a neat trick for displaying information and practice combining concepts?

Section 2 - Instruction

Often, we want to print messages that include variable values, like "Your score is 95". Manually combining strings and numbers can be tricky. Python offers f-strings (formatted string literals) to make this easy!

Engagement Message

Ever heard of this before?

Section 3 - Instruction

Using f-strings is simple! Just put an f before the opening quote of your string. Then, inside the string, place any variable name within curly braces {}. Python automatically inserts the variable's value.

Example: score = 100; print(f"Final score: {score}")

Engagement Message

What do you expect this code to print?

Section 4 - Instruction

F-strings shine inside conditional statements, making your output dynamic and clear.

Sign up
Join the 1M+ learners on CodeSignal
Be a part of our community of 1M+ users who develop and demonstrate their skills on CodeSignal