126k views
11 votes
Write a program which asks the user for their name and age. The program should then print a sentence.

What is your name?
Cory
What is your age?
48
Cory is 48 years old.

User Bbousq
by
4.8k points

1 Answer

4 votes

Answer:

name = input("What is your name? ")

age = int(input("What is your age? "))

print("%s is %d years old."% (name, age))

Step-by-step explanation:

This is a solution in python.

User Mava
by
5.4k points