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 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 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 new(): | |
return [] | |
def apilar(pila,elem): | |
pila.append(elem) | |
def desapilar(pila): | |
return(pila.pop()) | |
def invertir(pila): |
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 new(): | |
return [] | |
def apilar(pila,elem): | |
pila.append(elem) | |
def desapilar(pila): | |
return(pila.pop()) | |
def invertir(pila): |
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 pila | |
p=pila.new() | |
p2=pila.new() | |
aux=pila.new() | |
for i in range(0,5): | |
elem=input() | |
pila.apilar(p,elem) | |
print p |
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 new(): | |
return [] | |
def apilar(pila,elem): | |
pila.append(elem) | |
def desapilar(pila): | |
return(pila.pop()) | |
def invertir(pila): |
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
class Persona: | |
def __init__(self,apellido,nombre,ocupacion,edad): | |
self.__apellido=apellido | |
self.__nombre=nombre | |
self.__ocupacion=ocupacion | |
self.__edad=edad | |
def setApellido(self,__apellido): | |
self.__apellido=__apellido | |
def getApellido(self): |
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
# -*- coding: utf-8 -*- | |
class Persona: | |
def __init__(self,apellido="N/N",nombre="N/N",ocupacion="N/N",edad=0): | |
self.setApellido(apellido) | |
self.setNombre(nombre) | |
self.setOcupacion(ocupacion) | |
self.setEdad(edad) | |
def setApellido(self,apellido): | |
self.__apellido=apellido |
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
# -*- coding: utf-8 -*- | |
class Persona: | |
def __init__(self,apellido="N/N",nombre="N/N",ocupacion="N/N",edad=0): | |
self.setApellido(apellido) | |
self.setNombre(nombre) | |
self.setOcupacion(ocupacion) | |
self.setEdad(edad) | |
def setApellido(self,apellido): | |
self.__apellido=apellido |
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
msj = """Ingrese una lista de elementos separada por comas y | |
sin espacios ej: 1,mas,3,mas,1,mas,caca,de,pato,2,mas,caca\n""" | |
l = input(msj) | |
l = l.split(",") | |
res = [(l[i],l[:i+1].count(l[i])) for i in range(len(l))] | |
print(res) |
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
<html> | |
<head> | |
<script src="http://code.jquery.com/jquery.min.js" | |
type="text/javascript"></script> | |
<script> | |
$(function(){ | |
rama = $(".rama"); | |
function selectedImage(){ | |
rama.not(this).animate({"opacity": "0.4"}, 100) |