Skip to content

Commit 882b78f

Browse files
committed
read and understood the error
1 parent 7dbbd28 commit 882b78f

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

Sprint5/classes.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
class Person:
2+
def __init__(self, name: str, age: int, preferred_operating_system: str):
3+
self.name = name
4+
self.age = age
5+
self.preferred_operating_system = preferred_operating_system
6+
7+
imran = Person("Imran", 22, "Ubuntu")
8+
print(imran.name)
9+
print(imran.address)
10+
11+
eliza = Person("Eliza", 34, "Arch Linux")
12+
print(eliza.name)
13+
print(eliza.address)
14+
# error said person has no attribute "address" in line 9 and 13

0 commit comments

Comments
 (0)