Skip to content
Snippets Groups Projects
Select Git revision
  • df2f90f8c37118e612670d75d760e3b9299adae6
  • master default protected
2 results

intro.tex

Blame
  • Forked from Martin Mareš / Úvod do kryptografie
    Source project has a limited visibility.
    prvocisla-test.py 305 B
    #!/usr/bin/env python3
    # Otestuje, zda číslo je prvočíslem
    
    n = int(input())
    d = 2
    mam_delitele = False
    
    while d < n:
        if n%d == 0:
            print("Číslo", n, "je dělitelné", d)
            mam_delitele = True
            break
        d += 1
    
    if not mam_delitele:
        print("Číslo", n, "je prvočíslo")