Frage im Vorstellungsgespräch bei Tata Consultancy Services

Write a Python code to check if a number is prime.