There was an error while loading. Please reload this page.
1 parent 4120d95 commit 04b20d1Copy full SHA for 04b20d1
OrientacaoObjetos/Herança/cliente.py
@@ -0,0 +1,11 @@
1
+class Pessoa:
2
+ def __init__(self, nome, idade):
3
+ self.nome = nome
4
+ self.idade = idade
5
+
6
+class Cliente(Pessoa): #Herança DE PESSOA
7
+ pass
8
9
+class Aluno(Pessoa):
10
11
OrientacaoObjetos/Herança/main.py
@@ -0,0 +1,4 @@
+from cliente import Cliente
+cliente1 = Cliente('João', 20)
0 commit comments