Skip to content

Commit cb66951

Browse files
committed
Criado o método cumprimentar.
1 parent 48e9ce2 commit cb66951

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

oo/pessoa.py

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

0 commit comments

Comments
 (0)