class Hospital:
pass
class Doctor:
pass
d1, d2 = Doctor(), Doctor()
d1.name, d2.name = "Dr. Liri", "Dr. Mirlinda"
h = Hospital()
h.staff = {"cardiology": d1, "urologji": d2}
print(h.staff["urologji"].name)
What is printed when we execute the above script
Create a class, Building
Create a building, b, with attribute floors, name, and elevators.
Add one more elevator to b.
Create two classes, Backpack and Student.
Create a backpack, bp, with color attribute
Create a student, st, with name: str, grade: int and bag: Backpack attributes.
Create two classes, Zoo and Animal.
Create some animals with one attribute, name.
Create a zoo and add created animals to its animals: set attribute.
Add one more animal to the zoo.
Create one class, Animal.
Create an animal, a1, with name: str attribute
Create an animal, a2, with name: str and friend: Animal attributes
Create a class named Singer
Create a singer, s, with one attribute, name.
Change s's name
Create two classes, Bird and Nest.
Create a bird, with species: str and nest: Nest attributes.
class Horse:
pass
h = Horse()
h.name = "Storm"
h.age = 5
h.color = "Brown"
h.color = "Black"
h.age += 2
What is the value of the following expressions at the end of execution of the above script?
| h.color: | ||
| h.age: |
Create a class, Bottle
Create a bottle, b, with three attributes color: str, capacity: float, and open: bool.
Add 0.5 to b's capacity
Create two classes, Book and Author.
Create an author, writer, with name and age attributes
Create a book, novel, with title: str, pages: int and author: Author attributes.