Code comprehensionExercise 7/7Elementary20 XP

A prime test

Task

Read the function. What does the last line print?

def je_prvocislo(n):
if n < 2:
return False
for d in range(2, n):
if n % d == 0:
return False
return True
​
print(je_prvocislo(1), je_prvocislo(7))

Your answer

Choose one option.

Hints

Try it yourself first. Each hint reveals a little more - and lowers the reward a little.

Signed out, hints are free - but no XP is awarded either.

Solution

The solution unlocks after the last hint.