This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| menu = """ | |
| Bienvenido al conversor de monedas | |
| 1.- Soles Peruanos | |
| 2.- Pesos Mexicanso | |
| 3.- Pesos Argentinos | |
| Elige una opcion: """ | |
| opcion = input(menu) | |
| def conversor(moneda,valor): | |
| monto = input("Cuantos "+moneda+" tienes?: ") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| for contador in range(100): | |
| print(contador+1) | |
| for contador in range(1,11): | |
| print(contador+1) | |
| #Convertira tu range en una lista | |
| print(list(range(1,11))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def run(): | |
| for contador in range(1,101): | |
| if contador % 2 !=0: | |
| continue | |
| print(contador) | |
| for i in range(100): | |
| if i==90: | |
| break | |
| print(i) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def run(): | |
| numero = int(input("Ingrese su numero")) | |
| cont = 0 | |
| for i in range(1,numero+1): | |
| if i==1 or i==numero: | |
| continue | |
| if numero % i == 0: | |
| cont +=1 | |
| if cont == 0: | |
| return True |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import random | |
| def run(): | |
| numero = random.randint(1,10) | |
| numero_pensado = int(input("Que numero penso la PC: ")) | |
| while numero != numero_pensado: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import random | |
| def run(): | |
| mi_diccionario = { | |
| 'llave1':1, | |
| 'llave2':2, | |
| 'llave3':3, | |
| 'llave4':4, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import turtle | |
| def run(): | |
| tortuga = turtle.Turtle() | |
| tortuga.forward(50) | |
| tortuga.forward(50) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sys | |
| clients = '' | |
| def add_client(client_name): | |
| global clients | |
| if client_name.upper() not in clients.upper(): | |
| clients += client_name | |
| _add_coma() | |
| else: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def function_decorate(func): | |
| def worker(): | |
| print('Iniciamos esta funcion') | |
| func() | |
| print('Finalizamos esta funcion') | |
| return worker | |
| @function_decorate | |
| def suma(): |