208k views
0 votes
Assume that name and age have been declared suitably for storing names (like "abdullah", "alexandra" and "zoe") and ages respectively. assume also that stdin is a variable that references a scanner object associated with standard input. write some code that reads in a name and an age and then prints the message "the age of name is age" on a line by itself, where name and age are replaced by the values read in for the variables name and age. for example, if your code read in "rohit" and 70 then it would print out "the age of rohit is 70" on a line by itself. there should not be a period in the output.

User Bentesha
by
7.5k points

1 Answer

5 votes
name = "Bob"
age = 50

print("The age of" , name , "is" , age)
User Ohad The Lad
by
8.0k points