Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

A prime number is a number that is only evenly divisible by itself and 1. For ex

ID: 3531666 • Letter: A

Question

A prime number is a number that is only evenly divisible by itself and 1.
For example, the number 5 is prime because it can only be evenly divided by 1 and 5.
The number 6, however, is not prime because it can be divided evenly by 1, 2, 3, and 6.

Design a Boolean function named isPrime which takes an integer as an argument and returns True if the argument is a prime number, or False otherwise.
Use the function in a program that prompts the user to enter a number and then displays a message indicating whether the number is prime.


I have everything except the function. very confused about this. Please help! Its for an introduction to Programming and logic class so just pseudocode please (no python, c++ etc.)

Explanation / Answer

Function main
//No arguments passed to main function
Pass In: nothing

//Declare variables
Declare Integer number
Declare Boolean result

//Get the number
Display

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote