Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pregunta extra01:e2 #12

Open
noemiprian opened this issue Oct 12, 2018 · 3 comments
Open

Pregunta extra01:e2 #12

noemiprian opened this issue Oct 12, 2018 · 3 comments

Comments

@noemiprian
Copy link

Tengo una duda sobre la desviación estándar
Por lo que al programar la función, asignar los valores al correr el programa me regresa esto:
<function main.std(x)>
¿Qué significa?

@gerdm
Copy link
Owner

gerdm commented Oct 12, 2018

Hola @noemiprian,

¿Podrías compartir cómo estás corriendo tu función?

Usualmente esto ocurre cuando corres una función sin evaluarla.

In [1]: len                                                                                                            
Out[1]: <function len(obj, /)>

@gerdm gerdm changed the title Pregunta 2 extra 01 Pregunta extra01:e2 Oct 12, 2018
@noemiprian
Copy link
Author

noemiprian commented Oct 12, 2018

def std(x):
    suma=0
    for n in x :
        suma=suma+1
    promedio = suma/n
    sumaB= 0
    for j in x:
        sumaB=(j-promedio)**2+sumaB
    (sumaB/n-1)**(1/2)
    return (std)

@gerdm
Copy link
Owner

gerdm commented Oct 15, 2018

Hola @noemiprian. Si revisas la última línea de tu código, estás regresando es una función (la que definiste)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants