Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- def listaraicescuadradas(Listanumeros):
- """
- la funcion devuelve una lista con la raiz cuadrada
- de los elementos pasados en otra lista por argumentos.
- >>> lista = []
- >>> for i in [4, -9, 16]:
- ... lista.append(i)
- >>> listaraicescuadradas(lista)
- Traceback (most recent call last):
- ...
- ValueError: math domain error
- """
- return [math.sqrt(n) for n in Listanumeros ]
- import doctest
- doctest.testmod()
- ValueError: line 12 of the docstring for __main__.listaraicescuadradas has inconsistent leading whitespace: 'ValueError: math domain error
Add Comment
Please, Sign In to add comment