stidamcassidy stidamcassidy
  • 17-12-2020
  • Computers and Technology
contestada

What is the output?

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

Output: ​

Respuesta :

asarwar
asarwar asarwar
  • 17-12-2020

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

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

Answer Link

Otras preguntas

What was one effect of the Interstate Highway Act of 1957? the emergence of the car as America’s main mode of transportation the creation of speed limits as a
Trying to win Arguement- Is "she always wins" a sentence or a fragment?
Convert 1.25 ml = ___ kl
Final quetion on this website :D it's worth 30 points :) But there are 3 questions. Anwser them all completely please. I also give thanks and if you need help j
Which event marked the end of the Civil War? (A) General Lee’s men were surrounded at Appomattox. (B) The Army of Northern Virginia was defeated at Gettysburg.
What is the average atomic weight of silver
Which of the following people is not correctly matched to the industry or business he is historically associated with? (A) John D. Rockefeller—oil (B) John P. M
a basketball of mass 0.23 kg is thrown horizontally against a rigid vertical wall with a velocity of 20m/s. It rebounds with a velocity of 15m/s a)calculate the
What was the Beat Generation?
What type of eclipse is shown in the picture? Help please