Coding Question on 4.1.6

The question asks, “What value is printed when the following statements execute?” It then provides three values: ‘Thursday’, 32.5, and 19. If those are the values assigned, then won’t those be the values that print? Not sure why 19 is the correct answer if the other values are also assigned. I’m wondering if the question was to read as “What integer is printed…” instead.

Please advise if I’m looking at the question incorrectly.

Unless the verbiage is incorrect…This seems to be the case of order…the day=19 is last, so the last value of 19 is being printed. Removing day=19, would make the answer be the one above. If you were to have:

day1 = “Thursday”
day2 = 32.5
day3 = 19
print(day1) //thursday
print(day2) //32.5
print(day3) //19

They would print accordingly to the name.

1 Like

@PJPAVO Thank you for the reply. I forgot that the last value assigned is what is used, so 19 would be the correct answer since it was the last assigned value.