Loading...

The Number Screen

A easy Python interview practice problem on DataDriven. Write and execute real python code with instant grading.

Domain
Python
Difficulty
easy
Seniority
junior, mid

Problem

You need to generate a list of special numbers for a cryptographic application. Given an integer n, return all integers from 2 to n-1 that have no divisors other than 1 and themselves. Do not use any math libraries - implement the logic from scratch.

Practice This Problem

Solve this Python problem with real code execution. DataDriven runs your Python code in a sandboxed Docker environment and grades it instantly.