CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.

| Download
Project: EnsayoTaller2
Views: 50
Image: ubuntu2204
n=10 #n el entero dado numeros = list ( range (2,n+1)) #Contienes los numeros menores o iguales que n, se toma n+1 ya que el intervalo no incluye a n x=[] #Lista vacia for m in range (2,n+1) : #Para un entero m que este entre 2 y n if m in numeros : if m < sqrt (n) : for i in range (2*m, n+1,m) : if i in numeros : numeros . remove (i) c= numeros for v in c : if v % 4 == 3 : x . append ( v ) print ( x )
[3, 7]