Assignment on python problems

Assignment Help Mathematics
Reference no: EM13820068

Question 1. Write a function monexp(n) that returns the partial sum

Me(N) = ΣNk=1 (-1)k/k2.

Question 2. Representing a fraction as a list of two ints, e.g., 2/3 is represented as [2,3], write a function norm() that takes a list of two ints and returns a normalised form, e.g., norm( [-9, 12] ) returns [-3,4].

Question 3. Representing a complex number as a list of two floats, e.g., 2 + 3i be¬comes [2,3], write functions cmul 0 and cdiv() that multiplies and divides two complex numbers (in our representation).

Question 1. Write a function nprimes (n) that returns the number of prime numbers less than n.

Question 2. Write a function pprimes(n) that returns the product of the first n prime numbers.

Question 3. Write a function euprod(n) that returns the partial product
Π(1-1/p2)
p prime<n

Question 4. A positive integer is called square-free if it is not divisible by any perfect square other than 12. Write a function issquarefree (q) that returns True if q is square-free and False otherwise.

Question 5. A positive integer is called a perfect number if it is the sum of all its factors. Write a function isperfect(q) that returns True if q is perfect and False otherwise. Note: you may not simply check the input against known perfect numbers.

• No import is allowed (and similar builtins: exec, execf ile, __import_).

• Your program must not produce spurious output (i.e. no print statements please). Please clean up your debugging and test cases before submitting.

Reference no: EM13820068

Questions Cloud

How would you rate the leadership skill of ohlins management : How would you rate the leadership and communication skills of Ohlins management? Explain your rating. What suggestions do you have for improving the leadership and communication skills of Öhlins sales managers?
Accessible technology solutions : Accessible Technology Solutions
What professionals do you need to involve : As you craft your posts, think of the pros and cons of estate planning. Is it necessary for everyone? What happens if there is no plan in place? What are the costs? What professionals do you need to involve?
Describe the history and development of probation : Write an essay to describe the history and development of probation, including how it is organized and used today.
Assignment on python problems : Python problems
Analyze the financial performance of the organization : Interpret the operating indicators used to analyze the financial performance of the organization. Indicate specific ways in which this information will help management improve the performance of the organization. Provide support for your rationale..
Write essay supporting the veracity of the theme statement : The argument should include a discussion of the differences between corporate social responsibility and the triple bottom line concepts. Write a persuasive essay either supporting or denying the veracity of the theme statement;
What do gandolfos colors mean in asia : What do Gandolfo's colors mean in Asia? Gandolfo's offers franchises for a price. How can they make it interesting to investors in the Asian country?
Methods that can help prevent musculoskeletal disorders : Discuss methods that can help prevent musculoskeletal disorders in the workplace - Discuss the various types of radiation that a safety professional might encounter and some methods for protecting oneself against it.

Reviews

Write a Review

Mathematics Questions & Answers

  Victims of a certain disease being treated at wake medical

The victims of a certain disease being treated at Wake Medical Center

  Find the rate of change of the height when the height is

A right circular cylinder has a diameter of 12 in. and a height of 12 in. If water is flowing in at the rate of 4π in3 per minute, find the rate of change of the height when the height is 4 in.

  Finding a straight line to a set of data yields

Finding a straight line to a set of data yields the following prediction line: Y_hat=2 5Xi interpret the meaning of the Y intercept, bo

  Second-order and third-order rational functions

Repeat the procedure making a second graph for the third-order rational function (e.g., x3). For each of the two graphs, describe how changes in coefficients and constants change the behavior of the function.

  Find all possible values for the length of the rectangle

The width of a rectangle is 18 cenitmeters. Find all possible values for the length of the rectangle if the perimeter is at least 364 centimeters.

  Write a direct variation equation

The Walsh Family has decided to drive to Walt Disney World, in Orlando Florida, for their summer vacation. They will drive 260 miles in 4 hours. Write a direct variation equation to find the distance driven for any number of hours.

  What speed did the pony switch from a trot to a gallop

For one pony, the critical force was 1.16 times its body weight. It experienced a force of .75 times its body weight at a speed of 2 meters per second, and a force of .93 times its body weight at 3 meters per second. At what speed did the pony swi..

  Find the fundamental matrix for differential equation

Find the fundamental matrix for differential equation.

  Explores some of the statistical data

Write an essay that explores some of the statistical data that has been found in this area of study pertaining to the Flynn effect

  Explain how many people bought at least one of the two

2800 people were surveyed about their recent purchases. 715 of those people surveyed bought a television within the last year

  Eye colour probability

In a certain population of people, 20% are blue-eyed and 80% are brown-eyed. Also, 6% of the blue-eyed people are left-handed and 14%of the brown-eyed people are left-handed.

  Write an inequality that illustrates the problem

Write an inequality that illustrates the problem and solve. Express your answer as an inequality and explain how you arrived at your answer.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd