0

I'm stuck in python's example program

Which is to print name and age i.e name is age years old, but I'm getting confused to use variables using strings...can anyone help me?...

3rd Jan 2022, 5:12 PM
perla sushma
2 ответов
+ 7
perla sushma , please show us your attempt, so that we can see where the issue is. also share the tutorial name and the exercise number. thanks!
3rd Jan 2022, 5:51 PM
Lothar
Lothar - avatar
0
There is a lot of methods to do this, but the most modern way I know is : name = input() age = int(input()) print(f"{name} is {age} years old") //there is also : print(name, "is", age, "years old")
3rd Jan 2022, 6:24 PM
VCoder
VCoder - avatar