TOPIC 2: Variables, Data Types & Operators
Completion requirements
6. Exercise
- Write a program that accepts the user's name and age, and formats it into a sentence "Hello, [name]! You are [age] years old."
- Write a program that accepts two numbers and formats them as "The sum of [num1] and [num2] is [sum]."
- Use f-strings to format a string containing your favorite color and food.
- Use .format() to format a string showing the difference between two numbers.
- Write a program to format the current year and birth year into a sentence showing the age.