Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

The project consists of multiple portions. The first three parts consists of writing functions and the final part consists of sorting a list of numbers using those functions. They are as follows:

Part 1

A palindrome is a number which reads the same forward and backwards.

To illustrate:

10101,131,1331,1225221,2 are examples of palindromes

122,100,19 are examples of numbers which are not palindromes.

function that given a number determines if the number is a palindrome or not. Your function should take in a number and return "yes" or "no" depending if it's a palindrome or not.

Part 2

function that given a number determines if the number is near prime. To understand what is near prime let us first understand what a prime number is.

A number is prime is it is only divisible by 1 and itself.

2,5,13,23 are examples of prime numbers.

4,22,100,60 are examples of numbers which are not prime numbers.

Consider a number such as 49. It is not a prime number because it is divisible by 7. However, it is not divisible by anything else apart from 1, 7 and 49.

We call a number near prime if it is divisible by 1, itself and at most 2 other numbers. To illustrate:

49 is near prime as only 1,7 and 49 divide it.

22 is near prime as only 1,2,11,22 divide it.

4 is near prime as only 1,2,4 divide it.

60 is not near prime as 1,2,3,5,6,10,12,20,30,60 divide it.

17 is near prime as only 1,17 divide it

20 is not near prime as 1,2,4,5,10,20 divide it.

function which determines if a number is near prime or not.

Your function should take in a number and return "yes" or "no" depending if it's a near prime or not.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M92791142
  • Price:- $10

Priced at Now at $10, Verified Solution

Have any Question?


Related Questions in Computer Engineering

Which sentence would work better as a thesis statement for

Which sentence would work better as a thesis statement for a three-to-five-page college paper? Remember that a thesis should be a central idea that requires supporting evidence; it should be of adequate scope for essay's ...

Need references for information for the following dealing

Need references for information for the following dealing with CSMS (Consolidated Sales and Marketing System Project) Produce a narrative which describes the added error-handling pathways that includes: an overview of th ...

Question what concerns should be understood about data

Question: What concerns should be understood about data communications being sent over wireless networks? Discuss the pros and cons of one method of transmission, such as Wireless Application Protocol. The response must ...

Question responsive frameworks and libraries provide

Question : Responsive frameworks and libraries provide convenience when creating a modern website. Discuss at least three design options, such as hiding content or layout changes, that would be beneficial for a responsiv ...

Of 144 single women 41 had breast cancer 209 who were

Of 144 single women 41% had breast cancer, 209 who were married 52.2% had breast cancer and of 89 life bing with family 59.6% had breast cancer. Find the p value for the relationship?

Question social networks facebook twitter linkedin etc are

Question : Social Networks (Facebook, Twitter, LinkedIn, etc.) are widely used today. Describe how this technology can be used effectively in a business setting. Are there any drawbacks or limitations to using social net ...

Question suppose we know a lt b ie a reduces to b in linear

Question : Suppose we know A (a) What can be said about the running time for A? (b) What can be said about the running time for B?

Write a program that takes as input an xy center value and

Write a program that takes as input an x,y center value and radii for two circles, draws them in a turtle (Python) window, and prints whether they intersect or not. You should show intersecting circles, and show non-inte ...

Research the impact of a fade margin less than 10db on a

Research the impact of a fade margin less than 10dB on a wireless network in the following conditions: Severe weather conditions Extreme RF interference conditions

Step 1 pick a home appliance with significant user controls

Step 1: Pick a home appliance with significant user controls (e.g. Microwave, Stove/Range, Refrigerator, etc.). Do NOT select things like a TV remote control, computers, etc. Also do not select equipment that lack signif ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As