81.0k views
0 votes
What is the output?

class car:
model = "
age = 20
myCar = car()
myCar.age= myCar.age + 10
print(myCar.age)

Output: ​

2 Answers

7 votes

Answer:

30

Step-by-step explanation:

trust

User Lhaferkamp
by
4.1k points
3 votes

Answer:

The answer to this question is 30

The explanation is given below

You can also see the attachment section to see the image of result

Step-by-step explanation:

This question want use to print the value of myCar.age

print(myCar.age)

If we look at line 3, age=20

So the previous value is 20 and we have to add 10 to add as shown

myCar.age= myCar.age + 10

The value will become 30

User ABTOMAT
by
4.4k points