Ver Mensaje Individual
  #13 (permalink)  
Antiguo 29/11/2010, 10:10
sanfermin67
 
Fecha de Ingreso: noviembre-2010
Mensajes: 54
Antigüedad: 13 años, 5 meses
Puntos: 1
Respuesta: numeros primos

he conseguido crear una funcion por mi cuenta al final.

dime que te parece y que hay que corregir porfavor

Código Python:
Ver original
  1. def primos(n):
  2.     for i in range(2,n):
  3.         for x in range(2,i):
  4.             if not i%x == 0:
  5.                 print (i)
  6. primos(10)

el problema es que no me salen los numeros que yo quiero y creo que falta algo...porfavor ayudame.