Skip to content

Commit 02ae0a4

Browse files
author
Luan Carvalho
committed
Criando método cumprimentar.
1 parent 4e41750 commit 02ae0a4

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

oo/__init__.py

Whitespace-only changes.

oo/pessoa.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
class Pessoa:
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)