Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

1. The formula for converting a temperature from Fahrenheit to Celsius is

C=5/9(F-32)

where F is the Fahrenheit temperature and c is the Celsius temperature. write a function named Celsius  that accepts a Fahrenheit temperature as an argument. The function should return the temperature, converted to Celsius. Demonstrate the function by calling it in a loop that display a table of the Fahrenheit temperatures 0 through 20 and their Celsius equivalents. 

2. The profit from the sale of a stock can be calculated as follows:

Profit ? (( NS X  SP ) -  SC ) - (( NS X  PP ) +  PC )

where  NS is the number of shares,  SP is the sale price per share,  SC is the sale commission paid,  PP is the purchase price per share, and  PC is the purchase commission paid. If the calculation yields a positive value, then the sale of the stock resulted in a profit. If the calculation yields a negative number, then the sale resulted in a loss.

INSTRUCTIONS

Write a function that accepts as arguments the stock name, the stock ticker symbol, number of shares, the purchase price per share, the purchase commission paid, the sale price per share, and the sale commission paid. The function should return the profit (or loss) from the sale of stock.

Then use the function that you wrote in a program that calculates the total profit or loss from the sale of multiple stocks.  Therefore, the program must loop to allow this functionality.  The program should ask the user for the number of stock sales and the necessary data for each stock sale. It should accumulate the profit or loss for each stock sale and then display the total.

You must then allow the user to create a file that will store data about each stock sale.  The user should be able to create the own file name.  The data written to the file must be coherent data.  For example, do not simply written numeric data without an explanation of that numeric data.  You must also write the grand total of the sales and whether the sale ended in a profit or loss.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M91520025
  • Price:- $30

Guranteed 24 Hours Delivery, In Price:- $30

Have any Question?


Related Questions in Computer Engineering

What are some of the skill sets required for the various

What are some of the skill sets required for the various aspects of cloud administration. Are there any certifications related to cloud computing? Is there value in obtaining one of these certifications?

Question suppose we have the following context-free grammar

Question : Suppose we have the following context-free grammar which accepts a list of variable initializations. Goal ::= single | Goal single single ::= VAR "=" exp ";" exp ::= VAR | INT | exp + exp Here each V AR termin ...

Strategies when resources are constraineda project manager

Strategies When Resources Are Constrained A project manager has fewer options for accelerating project completion when additional resources are either not available or the budget is severely constrained. This is especial ...

The chancellor of a university has commissioned a team to

The Chancellor of a university has commissioned a team to collect data on students' GPAs (M = 3.0; SD = 0.5) and the amount of time they spend bar hopping every week (measured in minutes: M = 720; SD = 240). They find a ...

Ambrose has indifference curves with the equation x2 k -

Ambrose has indifference curves with the equation x2 = k - 4(x^0.5) ... Where the larger "k" is, the higher the indifference curve. If good 1 is drawn on the horizontal axis, and good 2 on the vertical... What is the SLO ...

Regarding terminology for the quality of a picture explain

Regarding terminology for the quality of a picture, explain briefly What is a pixel? What is color depth? Higher is better or lower Search for purchasing a monitor, list the specifications (concentrate on the criteria th ...

Not all context free grammars define regular languages

Not all context free grammars define regular languages. However, the following two DO define regular languages. For each grammar below, (a) describe the corresponding language and (b) draw the corresponding finite state ...

Assignmentsuppose you are asked to write a program to count

Assignment Suppose you are asked to write a program to count the frequency of occurrence of each word in a document. Describe how you would implement your program using: 1. A hash table to store words and their frequenci ...

Could you help me to solve the following stats problemthe

Could you help me to solve the following stats problem? The number of patients waiting for flu vaccine at A hospital has the following probability distributions. x 1 2 3 4 p(x) 0.2 0.3 0.4 0.1 What is the variance of num ...

We have a scheme program belowdefine lst i think you like

We have a Scheme program below: (define lst '(I (think you) like me)) (set! lst (cdr lst)) (set-car! lst '(thinks you)) (set! lst (cons 'he (cons 'also lst))) (a) For each execution step of the above program, draw the me ...

  • 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