This file contains 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
REMIX EXAMPLE PROJECT | |
Remix example project is present when Remix loads very first time or there are no files existing in the File Explorer. | |
It contains 3 directories: | |
1. 'contracts': Holds three contracts with different complexity level, denoted with number prefix in file name. | |
2. 'scripts': Holds two scripts to deploy a contract. It is explained below. | |
3. 'tests': Contains one test file for 'Ballot' contract with unit tests in Solidity. | |
SCRIPTS |
This file contains 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(): |
This file contains 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 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 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 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 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 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 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))) |
NewerOlder