Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CSCI 7-01 Assignment 4 use python 3.7 thank you 25 points, Due 3/22/2018 Rather than repeat the same or near identical lines of code in

CSCI 7-01 Assignment 4 use python 3.7 thank you

25 points, Due 3/22/2018

Rather than repeat the same or near identical lines of code in multiple places of the source code with a series of IF or ELSE or ELIF statements to control whether or not they should be executed or not. All programming languages use functions to store that code in one place in the source code file. code with python 3.7 thank you

Functions are external to the main routine

We can pass zero, one or more data type elements (arguments) to that function

The function can return zero or one calculated value back to the calling routine

Allow the user to:

Run this application repeatedly since we have seen While Loops

Allow the user to enter two numeric data values

Allow the user to select whether they wish to:

Add those two numbers

Subtract those two numbers

Multiply those two numbers

Divide the first number by the second number (if the denominator, second number, is zero, print an error message Cannot Divide by Zero

Display all of the above calculations, one function calling the other four functions

Raise the first number to the power of the second number (i.e. 4.5 2 or 3.43.3)

Quit

Output Example:

Option #1 - Add Two Numbers

Option #2 - Subtract Two Numbers

Option #3 - Multiply Two Numbers

Option #4 - Divide Two Numbers

Option #5 - Raise One Number to the Power of a Second Number

Option #6 - ALL Calculations

Option #7 - Quit

Enter Option: 1, 2, 3, 4, 5, 6 or 7: 3

Enter First Number: 23.4

Enter Second Number: 4.2

23.40 X 4.20 = 98.28

Option #1 - Add Two Numbers

Option #2 - Subtract Two Numbers

Option #3 - Multiply Two Numbers

Option #4 - Divide Two Numbers

Option #5 - Raise One Number to the Power of a Second Number

Option #6 - ALL Calculations

Option #7 - Quit

Enter Option: 1, 2, 3, 4, 5, 6 or 7: 6

Enter First Number: 4.6

Enter Second Number: 3

4.60 + 3.00 = 7.60

4.60 - 3.00 = 1.60

4.60 X 3.00 = 13.80

4.60 / 3.00 = 1.53

4.60 ** 3.00 = 97.34

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions

Question

Explain the nature of human resource management.

Answered: 1 week ago

Question

Write a note on Quality circles.

Answered: 1 week ago

Question

Describe how to measure the quality of work life.

Answered: 1 week ago