Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Here's output of another sample run ( again , user input is shown in bold red ) : This program will calculate the integral of

Here's output of another sample run (again, user input is shown in bold red):
This program will calculate the integral of the function 3x???3-2x???2
between user defined limits: a and b
What is the value of an1
What is the value of "b": 5
The accuracy of this calculation depends on the value
of n that you use.
What is the value of n:100
The integral over the provided limits is 378.8800000000008
And yet another sample run:
This program will calculate the integral of the function
3x???3-2x???2
between user defined limits: a and b
What is the value of "a": 1
What is the value of "b": 5
The accuracy of this calculation depends on the value
of n that you use.
What is the value of n:1000
The integral over the provided limits is 385.98559999999065
1
To help clarify, here are some specifics and/or constraints:
(1) Your program will require at least five user-defined functions. Feel free to add any extra functions you think are necessary.
A function that is in charge of prompting the user for any information. It takes a single argument representing the value required, prompts the user for that value, and returns the result to the calling statement.
A function that prints the introductory statements of the program. It does not take any arguments and does not return any values.
A function that prints out the statement about the accuracy of the n value. It does not take any arguments and does not return any values.
A function that evaluates the given mathematical function i.e.f(x)=3x3-2x2 It takes a single argument that represents x and returns the result of f(x) to the calling statement.
A function that calculates the riemann sum. It takes three arguments that represent the lower and upper limits of the integral, as well as the value of n i.e. the number of steps between the lower and upper limit. It returns the riemann sum to the calling statement.
(2) The main part of your program should make use of the functions (outlined above) in such a way as to satisfy the problem statement i.e. print the appropriate information, prompt for the appropriate information, and print out the appropriate results.
(3) Your output should be exactly like the sample runs shown above (of course, actual input values and calculations will vary depending on the provided inputs);
(4) You must include a meaningful header, use good coding style, use meaningful variable names, and comment your source code where appropriate;
(5) You must use the provided source code template (it contains helpful comments that can help you structure your code); and
(6) You must submit your source che as a single py file.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle9i Database Administrator Implementation And Administration

Authors: Carol McCullough-Dieter

1st Edition

0619159006, 978-0619159009

More Books

Students also viewed these Databases questions

Question

design a simple performance appraisal system

Answered: 1 week ago