Implement the design of the Bird class so that the following output is produced: # Write your codes here. print(“No.of Bird=”, Bird.count) ostrich = Bird('Ostrich') duck = Bird("Duck", True) owl = Bird('Owl', True) print(“###########################”) ostrich.fly() duck.fly() owl.fly() duck.setType('Water Birds') owl.setType('Birds of Prey') print(“=========================”) ostrich.printDetail() print(“=========================”) duck.printDetail() print(“=========================”) owl.printDetail() print(“=========================”) print(“No.of Bird=”, Bird.count) Output: No.of Bird= 0 ########################### Ostrich can not fly Duck can fly Owl can fly =========================== Name: Ostrich Type: Flightless Birds =========================== Name: Duck Type: Water Birds =========================== Name: Owl Type: Birds of Prey =========================== No.of Bird= 3
Implement the design of the Bird class so that the following output is
produced:
# Write your codes here.
print(“No.of Bird=”, Bird.count)
ostrich = Bird('Ostrich')
duck = Bird("Duck", True)
owl = Bird('Owl', True)
print(“###########################”)
ostrich.fly()
duck.fly()
owl.fly()
duck.setType('Water Birds')
owl.setType('Birds of Prey')
print(“=========================”)
ostrich.printDetail()
print(“=========================”)
duck.printDetail()
print(“=========================”)
owl.printDetail()
print(“=========================”)
print(“No.of Bird=”, Bird.count)
Output:
No.of Bird= 0
###########################
Ostrich can not fly
Duck can fly
Owl can fly
===========================
Name: Ostrich
Type: Flightless Birds
===========================
Name: Duck
Type: Water Birds
===========================
Name: Owl
Type: Birds of Prey
===========================
No.of Bird= 3
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images