-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathf1.py
More file actions
40 lines (28 loc) · 758 Bytes
/
Copy pathf1.py
File metadata and controls
40 lines (28 loc) · 758 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# tarea 1
# función hola()
# preguntar por el nombre de usuario
# imprimir un mensaje de bienvenida bonito
def hola():
name = input("cual es tu nombre")
print(f"Hola {name} !")
# definición a trabajar
def repetir(num):
for i in num:
return i
# Pasando parámetros a las funciones
def imprimir(a, b = "Hello"):
print(a, b)
# Imprimir muchos valores * es que podomos pasar muchas cosas
def imprimirNumeros(*args):
print(args)
if __name__ == "__main__":
# hola()
# tarea 2
# repetir 3 veces
# for i in range(3):
# hola()
# Pasando parámetros a las funciones
# imprimir("Hola")
# imprimir("Hola", "Kaixo")
# imprimir(b = "Hola", a = "Kaixo")
imprimirNumeros(29, 4593, 678)