0

What value does h refer?

k = 3 h = 5 k = h after the code above has executed, what value does h refer? I answered 5 but it said it was wrong. my reasoning was that I was changing the meaning of k to match h, which is 5.

8th Jun 2017, 6:54 AM
Fire Breathing Moon Beam
Fire Breathing Moon Beam - avatar
4 Réponses
+ 3
Value of h is still 5. Where does this question come from?
8th Jun 2017, 7:13 AM
Александр Громозонов
Александр Громозонов - avatar
+ 1
Very easy to test: k = 3 h = 5 k = h print (h) And, indeed, h equals 5 in the end. Unless there was more to that quiz (maybe additional lines of code?), your answer was absolutely correct.
9th Jun 2017, 7:47 AM
Bogdan Sass
Bogdan Sass - avatar
0
my teacher. it was quiz.
8th Jun 2017, 7:32 AM
Fire Breathing Moon Beam
Fire Breathing Moon Beam - avatar
0
that's what I thought. thank you, I'm going to contact my teacher bc I think I wither put in a typo or is just wrong.
11th Jun 2017, 6:26 AM
Fire Breathing Moon Beam
Fire Breathing Moon Beam - avatar