Prime Number Python Function Example Code Java