def facto(n): P=... for i in range(...,...): P=... return(P) def serie(n): L=[...] for i in range(...,...): ... return (L)