Write a function that checks whether a number is prime or not.

Depending on the student level I would accept a simple answer such as: (cannot format code) or expect a more complex answer with optimization such as sieve of Eratosthenes

Answered by Aimilios C. Python tutor

1406 Views

See similar Python Mentoring tutors
Cookie Preferences