I'm stuck on a question this is python beginner course | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

I'm stuck on a question this is python beginner course

Complete the code to output "name is age years old", where name and age are the declared variable values. im stuck on this...Input Imagine you’re working on a new contact management system. The program is required to ask the user for name and age inputs. The following output needs to be produced: “name is age years old”, where name and age are variables. There’s something wrong with the given code, can you fix it? Complete the code so name and age can be provided by the user. Sample Input: Anna 18 Sample Output: Anna is 18 years old. but there is another question that wans dan is21. i cant make two outputs, it would be Anna is 18 years old Dan is 21 years old but it wants it different. what do i doo aaaaaaaaaaaaaaa????!!?!?!?!?!?

21st Feb 2023, 11:21 PM
LANEY!! ☆
LANEY!! ☆ - avatar
1 Answer
+ 4
Laneyy☆ the question and solution is really simple.. name = input() age = int(input()) print("{} is {} years old".format(name,age))
22nd Feb 2023, 1:17 AM
BroFar
BroFar - avatar