Question
What is the output of the following part of python
program? x = ("apple", "banana", "cherry") print(x)ÂSolution
Correct answer:  1. ('apple', 'banana', 'cherry') Why this is correct: x  is a tuple of three strings. print(x)  prints the Python representation of the tuple: ('apple', 'banana', 'cherry') . Why the others are wrong: 2 & 3. print(x)  prints the whole tuple, not a single element — to print "cherry"  you'd need print(x[2]) . 4. The code is valid Python and does not produce an error.
2n years ago, the age of Rahul was four times that of his son and n years ago, the age of Rahul was thrice that of his son. If n years later, the sum of...
The ratio of A and B present age is 7:3. The product of their ages is 8400. What will be the ratio of their ages after 4 years?
Ratio of present ages of A and B is 5:7, respectively. C who is 9 years older than A will become 36 years older after 12 years. Find the present age of B.
After 7 years, the age of Reena will be 5 years less than 3 times of her age, 4 years back. What is Reena’s present age?
- The present ages of R and S are in the ratio 5:6. 3 years back, the average age of R, S, and T was 33 years. R was 12 years younger than T at that time. Wh...
B is 4 years older than A and A is 8 years older than C. If the sum of the age of A and C is 22 years, then find the sum of the ages of all three.Â
Reena is twice as old as Sunita .Three years ago, she was three times as old as Sunita. How old is Reena now?
The current ages of 'Pankaj' and 'Ranjan' are in the ratio of 2:5. If Ranjan's age 13 years from now will be six times Pankaj's age 6 years prior to now...
- Two years later, the combined age of 'Neha' and 'Ritu' will be 46 years. Nine years back, Neha was 7 years younger than Ritu. What will Ritu's age be 5 yea...
Present age of Sunita is 3 times the present age of Nita. 4 years hence twice the age of Sunita will be equal to thrice the age of Nita. Find the prese...