Skip to content

Commit 1ec9a29

Browse files
committed
Criado o método cumprimentar
1 parent 532ebb3 commit 1ec9a29

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

oo/pessoa.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,9 @@
11
class Pessoa:
2-
pass
2+
def cumprimentar(self):
3+
return f'Olá {id(self)}'
4+
5+
if __name__ == '__main__':
6+
p = Pessoa()
7+
print(Pessoa.cumprimentar(p))
8+
print(id(p))
9+
print(p.cumprimentar())

0 commit comments

Comments
 (0)