Question: What is the output of the code below? ` ` ` class Truck: def _ _ init _ _ ( self ) : self.speed =

What is the output of the code below?
```
class Truck:
def __init__(self):
self.speed =0
self.cargo = "empty"
def get_cargo(self):
return "This truck is carrying a load of "+ self.cargo
t1= Truck()
t2= Truck()
t1.speed =50
t2.cargo = "Oranges"
print(t2.speed)
print(t1.get_cargo())
O
```
This truck is carrying a load of Oranges
O
This truck is carrying a load of empty
50
This truck is carrying a load of Oranges
50
This truck is carrying a load of empty
What is the output of the code below? ` ` ` class

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!