We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 63759bc commit f733437Copy full SHA for f733437
Desarrollo/main.py renamed to Desarrollo/13_Millas.py
Desarrollo/14_Polimorfismo.py
@@ -0,0 +1,28 @@
1
+class Persona:
2
+
3
+ def __init__(self, nombre):
4
+ self.nombre = nombre
5
6
+ def avanza(self):
7
+ print('Ando caminando')
8
9
10
+class Ciclista(Persona):
11
12
13
+ super().__init__(nombre)
14
15
16
+ print('Ando moviendome en mi bicicleta')
17
18
19
+def main():
20
+ persona = Persona('David')
21
+ persona.avanza()
22
23
+ ciclista = Ciclista('Daniel')
24
+ ciclista.avanza()
25
26
27
+if __name__ == '__main__':
28
+ main()
0 commit comments