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
<?php | |
$fecha = $_POST['fecha']; | |
$hora = $_POST['hora']; | |
$nombre = $_POST['nombre']; | |
$apellido = $_POST['apellido']; | |
$conexion = mysql_connect("localhost","user","pass"); |
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
Environment: | |
Request Method: GET | |
Request URL: http://127.0.0.1:8000/admin/ | |
Django Version: 1.3.1 | |
Python Version: 2.7.2 | |
Installed Applications: | |
['django.contrib.auth', |
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
i=0 | |
in_number = raw_input("INGRESE UN NUMERO:") | |
lista = [] | |
while in_number: | |
lista.append(int(in_number)) | |
in_number = raw_input("INGRESE UN NUMERO:") | |
for number in lista: | |
if number % 2 == 0: |
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 maximo(lista): | |
m = max(lista) | |
print m | |
lista=[1,50,60,5] |
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
# max es una funcion nativa de paython asi que | |
# no la podes usar como nombre de variable | |
def maximo(lista,i=0,m=0): | |
if i == len(lista) - 1: | |
return m | |
else: | |
if lista[i]>=m: | |
m=lista[i] | |
return maximo(lista,i+1,m) |
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 pares(lista,i=0): | |
if i<len(lista): | |
if lista[i]%2==0: | |
print lista[i] | |
pares(lista,i+1) | |
lista=[1,4,5,9,8] | |
# print pares ..... emmm hasta ahora no te diste cuenta que tenes | |
# que llamar a una funcion para que esta se ejecute | |
pares(lista) |
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 rec(n): | |
if n<2: | |
return 1 | |
else: | |
n=random.random() | |
return n*rec(n) | |
numf=rec(3) | |
print numf |
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 math | |
def recSC(n): | |
if n==1.0: | |
return 1.0 | |
else: | |
n=math.sqrt(math.sin(n)**2+math.cos(n)**2) | |
return n*recSC(n) | |
print recSC(10) |
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 new(): | |
return [] | |
def apilar(pila,elem): | |
pila.append(elem) | |
def desapilar(pila): | |
return(pila.pop()) | |
def invertir(pila): |
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 new(): | |
return [] | |
def apilar(pila,elem): | |
pila.append(elem) | |
def desapilar(pila): | |
return(pila.pop()) | |
def invertir(pila): |
OlderNewer