Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
hackinscience
hkis-exercises
Commits
3b9f738a
Verified
Commit
3b9f738a
authored
Apr 13, 2022
by
Julien Palard
Browse files
Tell them what they printed, it can help, in case it's obviously not a prime number.
parent
619c6af3
Pipeline
#501707
passed with stages
in 2 minutes and 6 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
exercises/print-the-first-prime-number-after-the-given-one/check.py
View file @
3b9f738a
...
...
@@ -18,11 +18,11 @@ def check():
ch
.
code
(
output
),
)
if
output
>
100000007
:
ch
.
fail
(
"It's less
."
)
ch
.
fail
(
"It's less
, your code printed:"
,
str
(
output
)
)
if
output
<
10000099
:
ch
.
fail
(
"It's way more, like 10× more
."
)
ch
.
fail
(
"It's way more, like 10× more
, your code printed:"
,
str
(
output
)
)
if
output
<
100000007
:
ch
.
fail
(
"It's more
."
)
ch
.
fail
(
"It's more
, your code printed:"
,
str
(
output
)
)
their_code
=
Path
(
"solution.py"
).
read_text
()
if
"100000007"
in
their_code
and
len
(
their_code
)
<
25
:
ch
.
fail
(
"I see what you did here."
)
...
...
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