Security Key Validator (Prime)

Medium
#loops #math #cryptography

Input: `n` (int). Return: `True` if `n` is prime (valid key), else `False`. Prime numbers are improved for encryption keys.

Example

Input: 2
Output: True
Need a hint?
  • Check divisibility from 2 to sqrt(n)
Run your code to see output