Skip to content
← Back to Community
A Prime Number Calculator
Profile icon
mariocat

A program that checks if a number is prime, composite, or neither.

Voters
Profile icon
mariocat
Comments
hotnewtop
Profile icon
CoderGautamYT

Great start! I suggest using only one except without an error specified. Specifying the error is only for when you need to do different things on different errors. In your case, your doing the exact same thing on both errors.

Profile icon
MrVoo

Nice, maybe make it repeat so you don't have to press run every time?

Profile icon
mariocat

@MrVoo thank you for your feedback!

Profile icon
MrVoo

@mariocat A l s o, you don't need to specify an error for except statements, just except: will do.

Profile icon
mariocat

@MrVoo ah ok, thanks for letting me know!