Loading...
Format strings using f-strings and string methods.
Python offers multiple ways to format strings:
Write a function format_info(name, age, score) that returns a formatted info card.
Return a dictionary with:
name = "john doe", age = 25, score = 95.5
{'greeting': 'Hello, John Doe!', 'info': 'John Doe is 25 years old', 'score_display': 'Score: 95.50'}.title() capitalizes 'john doe' to 'John Doe', :.2f formats float to 2 decimals