Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Martin Mareš
prm1
Commits
6af67988
Commit
6af67988
authored
Oct 06, 2019
by
Martin Mareš
Browse files
02: Hezčí programy
parent
508d4807
Changes
2
Hide whitespace changes
Inline
Side-by-side
02-cykly/prvocisla-else.py
View file @
6af67988
...
...
@@ -7,7 +7,6 @@ d = 2
while
d
<
n
:
if
n
%
d
==
0
:
print
(
"Číslo"
,
n
,
"je dělitelné"
,
d
)
mam_delitele
=
True
break
d
+=
1
else
:
...
...
02-cykly/prvocisla-vypis.py
View file @
6af67988
...
...
@@ -6,15 +6,11 @@ n = int(input())
x
=
2
while
x
<=
n
:
d
=
2
mam_delitele
=
False
while
d
<
x
:
if
x
%
d
==
0
:
mam_delitele
=
True
break
d
+=
1
if
not
mam_delitele
:
else
:
print
(
x
)
x
+=
1
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment