>>> def pertenece(x,y,z): if x>=y and x<=z: return True else: return False >>> def piedraPapelTijeras(x): if pertenece(x,1,3): if x==1: return "piedra" elif x==2: return "papel" elif x==3: return "tijeras" >>> def ganador(x,y): if x==y: return 0 elif (x=="tijeras" and y=="papel") or (x=="piedra" and y=="tijeras") or (x=="papel" and y=="piedra"): return 1 elif (x=="piedra" and y=="papel") or (x=="papel" and y=="tijeras") or (x=="tijeras" and y=="piedra"): return 2 >>> def producto(x,y): if x==0 or y==0: return 0 else: return x + producto(x,y-1) >>> def cociente(a,b): if a>> def divisiones(a,b): if not b%a==0: return 0 else: return 1 + divisiones(a/b,b) >>> def dineroFinal(monto,interes,anios): if anios==0: return monto else: return (1 + interes/100.0)*dineroFinal(monto,interes,anios-1) >>> def f(x,i): if i==1: return x else: return (((-1.0)*x**2)/((2*i-1)*(2*i-2)))*f(x,i-1) >>> def suma(x,n): if n==0: return 0 else: return f(x,n)+suma(x,n-1) >>> def results(n=-4): if n>4: return else: print("x="+str(math.pi*(n/4.0))+" suma="+str(suma(math.pi*(n/4.0),15))) results(n+1)