Question: Write a function named prime _ factor ( x ) that will find the prime factorization of an integer x . The function will output

Write a function named prime_factor(x) that will find the prime factorization of an integer x. The function
will output a numeric vector. All of the values in the output vector will be prime. The product of the numeric
vector will be the original value x. There should be a check to make sure that the input value is a number
greater than or equal to 2 with no decimal values with appropriate error messages.
If youre stuck on getting started with this, I suggest doing some prime factorizations yourself. For example,
try to find the prime factors of 171 or 364. Note the steps you go through to find these prime factors and
see if you can create code to do it.
You should not need to use the is_prime() function in your prime_factor() function.
(The point of the exercise is to give you practice writing code. Yes, I am aware that solutions to this problem
already exist on the Internet. Dont search for them. While the problem is simple, it is complex enough
that it is incredibly unlikely for students to create identical code solutions. You are free to talk about your
approach and I fully expect many students to take identical approaches, but students writing identical code
is an entirely different matter.)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

media pointerfileservicefileWaoi7fjtR9z9P74DUB8Qqc Question 6 A real number a 01 is ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!