Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Your goal is to ask the user for a number and to determine if that number is a prime number. Use a funct function to
Your goal is to ask the user for a number and to determine if that number is a prime number. Use a funct function to determine if the umber is prime Ygm should have the following: .The name of the program should be Assignment. . Ask the user for an integer. Store this result in a variable with an appropriate name. 3 comment lines (description of the program, author, and date). (1 point) Write a function that has an integer parameter and determines if that integer is a prime number. A prime number is divisible by itself and 1. This function should return true if the number is prime and false if the number is not prime. Give this function an appropriate name. (5 points) . ll the function and save the result in a variable. 2 points) . Display the result of whether the user entered number is prime or not prime. (2 points)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started