Skip to content

Commit 4393968

Browse files
committed
adicionou metodo cumprimentar e alguns ex
1 parent 97ee4e4 commit 4393968

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"Ola {id(p)}"
4+
5+
if __name__== '__main__':
6+
p = Pessoa()
7+
print(Pessoa.cumprimentar(p)) # igual a linha 9
8+
print(id(p))
9+
print(p.cumprimentar())

0 commit comments

Comments
 (0)