Try it on paper first. A hint, the key idea and the worked solution are here when you need them.
Store your name, your age and your city in three variables. Then show one sentence that uses all three.
Make the variables first. Use their names, without quotation marks, in print().
Have you tried it?
Work it out on paper first. It is fine to get stuck or make a mistake: that is how we learn. When you are ready, compare your working with the solution.
Plan. One variable for each fact, then one print().
name = "Meera", age = 12 and city = "Pune".print(name, "is", age, "years old and lives in", city).The names are used without quotation marks, because we want their values. The words inside quotation marks are shown as text.
Check. The program shows Meera is 12 years old and lives in Pune.
Log in to join the discussion.
Loading…