0
Python 13.1 LESSON
How to solve it, I can’t get it & where the answer comes out. Help pls. Guess the output of this code: Age = 42 Age = 24-6 Print(age)
5 Respostas
+ 4
The last value of the variable(age) is 24 - 6, so the answer is what you get when you subtract 6 from 24. To understand why that is the answer, you need to understand how Python reads and executes code. Python reads the code from top to bottom, meaning that in cases like this one, where the same variable is equated to 2 values, Python will only consider the last value of the variable; in this case that is 24 - 6.
If you need further explanation feel free to ask.
+ 3
Python is sensitive language so that "age" is different from "Age".
You can change print(age) by print(Age).
+ 2
Question is confusing. Where did you find that code and why do you think it would give 1 as output?
+ 2
The answers are expected of a print statement/s. In yor code for example with:
print(age)
+ 1
18