Skip to content
Snippets Groups Projects
Select Git revision
  • 675e241cb6345e918711ded779c5139077ae7dbd
  • master default
  • ls2021
  • ls1920
4 results

objektove2.py

Blame
  • prvocisla-vypis.py 224 B
    #!/usr/bin/env python3
    # Vypíše všechna prvočísla od 1 do n
    
    n = int(input())
    
    x = 2
    while x <= n:
        d = 2
        while d < x:
            if x%d == 0:
                break
            d += 1
        else:
            print(x)
    
        x += 1