Making a contact management system. Please help | Sololearn: Learn to code for FREE!


Making a contact management system. Please help

The given program declares two variables, name and age. Complete the code to output "name is age years old", where name and age are the declared variable values. name = "James" age = "42"

8/7/2022 6:51:27 PM

Samuel Adesanya

8 Answers

New Answer


Samuel Adesanya , Pavan Kuncham , it is simpler to use this notation instead of using `+` and concatenation. we don't need to handle additional spaces in the string. just use commas to separate the arguments inside print() function: print(name, "is", age, "years old")


Please read the previous lesson again. Compare for example print("a+b") and print("a"+"b").


What have you tried so far? Re-read the lessons and show your code attempt please.


Lothar ok bro and thank you for extra information


The expected output is: James is 42 years old


I have read the lesson countless times and I've even gone through the comments below each lesson and I don't seem to be getting it, maybe I need a little help. This is my attempt below: name = "James" age = "42" print ("name+is+age+years+old")


name = "James" age = "42" Print(name+" is"+age+" years old")


print("name is "+name++" "+age+" years old")