Skip to content

Commit 0372521

Browse files
committed
Criado método cumprimentar
1 parent 0e78580 commit 0372521

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

oo/pessoa.py

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

0 commit comments

Comments
 (0)