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?...
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!
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")