Personal Details Formatter
Practice reading multiple pieces of input and combining them into one clean sentence using an f-string.
You are given a person's name, age, and city, one per line. Combine them into a single formatted sentence.
What the problem means: read three separate pieces of input (two pieces of text, one number) and weave them into one output sentence, matching the punctuation shown in the example exactly.
Approach: read the name and city directly with input(). Read the age as an integer with int(input()). Then build the sentence with an f-string.
Input: Three lines: the person's name, their age (a whole number), and their city.
Output: One line: <name> is <age> years old and lives in <city>.
Aditi 21 Pune
Aditi is 21 years old and lives in Pune.
- Name and city contain no digits.
- 1 <= age <= 120
Hint 1
Read the three lines in order: name, age, city.
Hint 2
int() converts the age line into a whole number before you use it in the f-string.
Hint 3
An f-string like f"{name} is {age} years old" inserts variable values directly into the text.
Read the three input lines in order — name and city as plain strings, age converted with int(). Then plug all three straight into one f-string that matches the required punctuation exactly: f"{name} is {age} years old and lives in {city}.". The whole problem is really about combining input(), int(), and f-strings — the three building blocks covered earlier in this topic.