id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

isPrime


A number is prime if its only factors are 1 and itself, write function to determine if a number is prime


isPrime(4) → False
isPrime(5) → True
isPrime(6) → False

...Save, Compile, Run (ctrl-enter)

def isPrime(x):

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Python Help

Difficulty: 10 Post-solution available

Copyright Nick Parlante 2017 - privacy