Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Create a Python program as described below and save it in a file named bool. You should use IDLE or similar environment to create your program.

Your assignment is to first develop a conceptual model and document it using either pseudo code or a flowchart to meet the requirements of the program described as follows.

For your assignment you must write a compare function that returns 1 if a > b , 0 if a == b , and -1 if a < b. The user must be prompted for the values of a and b. The compare function must have arguments for a and b.

To demonstrate your compare function, you must call the compare function three times, once for each condition, from within your program and display (using print statement) the return code of the function.

Of course you will make static calls to your function to meet the test requirements. Something like:

print compare(5,2)

print compare(2,5)

print compare(3,3)

Then your program will switch to user input. Something like:

print compare(user_input_A, user_input_B)

Use the following table of values for a and b can be used when calling to test your compare function from within your program:

Don't forget to use comments and make your program readable.

Test values

a

b

5

2

2

5

3

3

Computer Engineering, Engineering

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

Priced at Now at $10, Verified Solution

Have any Question?


Related Questions in Computer Engineering

Discuss the importance functionality and role of a

Discuss the importance, functionality, and role of a GateKeeper or VoIP server in a VoIP -deployed network?

Referring to the slides from text book chapter 5 there are

Referring to the slides from text book, Chapter 5, there are two versions of Fibonacci number calculators: BinaryFib(n) and LinearFibonacci(n). The first algorithm has exponential time complexity, while the second one is ...

Select one of the methods that makes the most sense to you

Select one of the methods that makes the most sense to you, and list the steps in detail. Imagine that you're tutoring another student in how to calculate subnets, and be sure to include enough detail that the steps woul ...

Suppose that 75 of all trucks undergoing a brake inspection

Suppose that 75% of all trucks undergoing a brake inspection at a certain inspection facility pass the inspection. Consider groups of 15 trucks and let X be the number of trucks in a group that have passed the inspection ...

Question for this assignment you will continue your

Question: For this Assignment, you will continue your practice as a critical consumer of research. You will critically evaluate a scholarly article related to one-way ANOVA testing. To prepare for this Assignment: • Use ...

Display the manager of the employee with the oldest project

Display the manager of the employee with the oldest project start date (start_date). (This query requires 3 nested queries, start by finding the min start_date from project, then find the emp_id from project where start_ ...

What is vsftpd name two other server packages that may be

What is vsftpd? Name two other server packages that may be used for the same purpose

What is the broadcast domain and ports for hubs and

What is the Broadcast Domain and Ports for hubs and bridges?

Question suppose that in a divide and conquer algorithm we

Question : Suppose that, in a divide and conquer algorithm, we divide an instance of size n of a problem into 16 sub instances of size n/4 and the dividing takes O(1) time (you may ignore this step). Then we combine the ...

Give an example of a merger or acquisition where technology

Give an example of a merger or acquisition where technology contributed to its failure to produce desired outcomes. What reasons caused the failure? What actions might have helped ensure success?

  • 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