Professional Documents
Culture Documents
Exercises
Exercises
You can add the missing exclamation mark using string concatenation, format, or f-
strings. The choice is yours.
2. Ask the user for their name, and then greet the user, using
their name as part of the greeting. The name should be in
title case, and shouldn't be surrounded by any excess white
space.
For example, if the user enters "lewis ", your output should be something like this:
Remember that we can only concatenate strings to other strings, so you will have to
convert the integer to a string before you can perform the concatenation.
4. Format and print the information below using string
interpolation.
5. Create a Python application that asks the user for their age
in years, and prints back the number of seconds they've lived
for. Try to use f-strings if possible.