Sign InCreate Account

Upgrade to Pro

Upgrade Now

Coding Workspace

EditorProjectsPractice QuestionsTimed Mock ExamsFlowcharts

PseudoEditor AI

Pseudocode TutorCode GeneratorCode FixerCode Converter
Back to Problems
PreviousNext

Sign in to run tests against edge cases and save your code automatically.

Problem Description

Medium

Primes Up To N Using a Function

PROModular Programming
Functions
Return Values

Write a function `IsPrime(n)` that returns `TRUE` if the integer `n` is a prime number and `FALSE` otherwise. (A prime number is greater than 1 and has no divisors other than 1 and itself.) Then write a main program that inputs an integer `N`, calls `IsPrime` for every whole number from 2 to `N` inclusive and outputs each prime number on its own line. If there are no primes in that range, output `None`. For example, if `N` is 10 the output is 2, 3, 5, 7 (one per line).

Example Input

10

Example Output

2 3 5 7

Success Rate:

0% (0 passed / 0 attempted)

Code

Draft auto-saved

Test Results

Click "Test Code" to evaluate your code against the tests.

Product

For SchoolsOverviewFeaturesFAQ
PseudoEditor

© 2026 PseudoEditor. All rights reserved.