Questions
Explain decomposition and superposition of force vectors. Give applications of Newton's Laws of Motion in daily...

  • Explain decomposition and superposition of force vectors.
  • Give applications of Newton's Laws of Motion in daily lives.

In: Physics

Section 6.9 of your textbook ("Debugging") lists three possibilities to consider if a function is not...

Section 6.9 of your textbook ("Debugging") lists three possibilities to consider if a function is not working.

Breaking a large program into smaller functions creates natural check points for debugging. If a function is not working, there are three possibilities to consider:
• There is something wrong with the arguments the function is getting; a precondition is violated.
• There is something wrong with the function; a postcondition is violated.
• There is something wrong with the return value or the way it is being used.

1. Describe each possibility in your own words.

2. Define "precondition" and "postcondition" as part of your description.

3. Create your own example of each possibility in Python code. List the code for each example, along with sample output from trying to run it.

In: Computer Science

Python: Using Inheritance to Create a Derived Class in Python In this lab, you create a...

Python: Using Inheritance to Create a Derived Class in Python

In this lab, you create a derived class from a base class, and then use the derived class in a Python program. The program should create two Motorcycle objects, and then set the Motorcycle’s speed, accelerate the Motorcycle object, and check its sidecar status.

Instructions

  1. Open the file named Motorcycle.py.
  2. Create the Motorcycle class by deriving it from the Vehicle class. Use a public derivation.
  3. In the Motorcycle class, create an attribute named sidecar.
  4. Write a public set method to set the value for sidecar.
  5. Write a public get method to retrieve the value of sidecar.
  6. Write a public accelerate method. This method overrides the accelerate method inherited from the Vehicle class. Change the message in the accelerate method so the following is displayed when the Motorcycle tries to accelerate beyond its maximum speed: "This motorcycle cannot go that fast".
  7. Open the file named MyMotorcycleClassProgram.py.
  8. In the MyMotorcycleClassProgram, there are two Motorcycle objects named motorcycleOne and motorcycleTwo.
  9. Set the sidecar value of motorcycleOne to true and the sidecar value of motorcycleTwo to false.
  10. Set motorcycleOne’s maximum speed to 90 and motorcycleTwo’s maximum speed to 85.
  11. Set motorcycleOne’s current speed to 65 and motorcycleTwo’s current speed to 60.
  12. Accelerate motorcycleOne by 30 mph, and accelerate motorcycleTwo by 20 mph.
  13. Print the current speed of motorcycleOne and motorcycleTwo.
  14. Determine if motorcycleOne and motorcycleTwo have sidecars. If yes, display the following: "This motorcycle has a sidecar". If not, display the following: "This motorcycle does not have a sidecar".
  15. Execute the program.

In: Computer Science

The ΔG°\' of the reaction is -7.050 kJ ·mol–1. Calculate the equilibrium constant for the reaction....

The ΔG°\' of the reaction is -7.050 kJ ·mol–1. Calculate the equilibrium constant for the reaction. (Assume a temperature of 25° C.What is ΔG at body temperature (37.0° C) if the concentration of A is 1.8 M and the concentration of B is 0.75 M?

In: Chemistry

Create properly formatted script file (Initials_Final_pb_02.m) that will prompt the user to input a 1-D array...

Create properly formatted script file (Initials_Final_pb_02.m) that will prompt the user to input a 1-D array of numbers (positive, negative, zero) and then use loop and conditional statement to find the number of all non-zero elements in this array and their products

Do NOT use the built-in commands such as sum, prod, length, size, … etc.

-        Use proper names for input and output variables.

Use the following 3 vectors to test your function and include the results as a commented text at the end of your script file. [3 -1 0 -4 2], [10 -15 20 -15 0], [1 0 -2 5 -2 3]

Format the output using fprintf similar to the following:

There are 4 non-zero numbers and their product is 24

In: Computer Science

Identify the following species as electrolytes or nonelectrolytes: CH3OH NH4Cl Ca(OH)2 C6H6 RbClO4

Identify the following species as electrolytes or nonelectrolytes:

CH3OH

NH4Cl

Ca(OH)2

C6H6

RbClO4

In: Chemistry

you jump from a 20 meter tall building to a 12 meter tall building you jump...

you jump from a 20 meter tall building to a 12 meter tall building you jump horozontally with a speed of 5.0 m/s.

all must be answered using ther following equations v = dx/dt;   a = dv/dt;    v = v0 + at;    x = x0 + vot + at2/2;    v2 = vo2 + 2aD

how long in seconds are you in the air?

how far apart are the two buildings assuming you jumped from the edge and landed on the edge?

what is your speed when you land?

for this question you must use the pythagrium therm

In: Physics

1. What is output by the following C++ code segment? Assume myList is an initially empty...

1. What is output by the following C++ code segment? Assume myList is an initially empty linked list that can store floats. Draw the linked list (with head, nodes, and pointers) to show how it looks conceptually by the time the code completes executing.

FloatList myList;

myList.insertNode(5.25);

myList.insertNode(2.14);

myList.appendNode(9.11);

for (int x = 1; x < 4; x++)

   myList.insertNode(x * 0.1);

myList.deleteNode(2.14);

myList.displayList();

Output:

Linked list drawing:

In: Computer Science

A titration involves adding a reactant of known quantity to a solution of an another reactant...

A titration involves adding a reactant of known quantity to a solution of an another reactant while monitoring the equilibrium concentrations. This allows one to determine the concentration of the second reactant. The equation for the reaction of a generic weak acid HA with a strong base is

HA(aq)+OH?(aq)?A?(aq)+H3O+(aq)

A certain weak acid, HA, with a Ka value of 5.61�10?6, is titrated with NaOH.

Part A:

A solution is made by titrating 9.00mmol (millimoles) of HA and 3.00mmol of the strong base. What is the resulting pH?

Part B:

More strong base is added until the equivalence point is reached. What is the pH of this solution at the equivalence point if the total volume is 45.0mL ?

In: Chemistry

the cost function for a firm with a Cobb-Douglas production function  y = x1ax2b   can be written as...

the cost function for a firm with a Cobb-Douglas production function  y = x1ax2b   can be written as c(y) = Ky1/(a+b).

a) Demonstrate that if  a+b < 1 the firm’s long-run average and marginal cost functions must be increasing in y.

b) Demonstrate that if  a+b = 1 the firm’s long-run average and marginal cost functions will not be increasing in y but instead will be constant.

In: Economics

Exercise3: GuessingGame.cpp Write a program that plays a game where the computer generates a random number...

Exercise3: GuessingGame.cpp

  • Write a program that plays a game where the computer generates a random number between 1 and 100, and then lets the computer guess the right number.
  • For each guess the program should display “too high” or “too low”, and then adjust the min and max of the next guess accordingly until either the correct number is guessed (game won) or 10 guesses are made without finding the right number (game lost).
  • When a game is won, display the number of guesses that were made to arrive at the correct answer.
  • Allow the user to determine how many games are played.
  • When the user wants to stop, display the total number of games played, the number of games won, the number of games lost, and the average number of guesses it took to find the correct number.

In: Computer Science

Please show work, don't just put it in excel: A firm will choose one of two...

Please show work, don't just put it in excel: A firm will choose one of two projects. Both projects have useful lives of 10 years. Project A has an initial cost of $10,000, annual fuel cost of $500 per year, maintenance cost of $100 at the end of year 1 that increases by $25 per year thereafter, a salvage value of $1,000, and annual benefits of $2,300. Project B has an initial cost of $13,000, annual fuel cost of $400 per year, maintenance cost of $100 at the end of year 1 that increases by 10% per year thereafter, a salvage value of $2,000, and annual benefits of $2,500. Evaluate the present worth using an interest rate of 8 percent, compounded annually.

1.What is the present worth of project A ($)?

2.What is the present worth of the annual benefits for Project B ($)?

3.What is the present worth of Project B ($)?

4.Suppose that Project A has a present worth of $1,294 and that project B has a present worth of $1,105 (these are not the correct answers to prior parts of the problem), which project is preferred?

5.Suppose that the interest rate is 6.7 percent. At this interest rate, what is: 1. the net present value of Project A ($)? 2. the net present value of Project B ($)? 3. from an engineering perspective, is there any significant difference in the present value of these two projects (y/n)?

In: Economics

Discuss the process of digestion of starch, beginning in the mouth and ending with uptake in...

  1. Discuss the process of digestion of starch, beginning in the mouth and ending with uptake in to the muscle cell for ATP production, making sure to touch on major transporters, and enzyme and hormone actions each step. (12 sentences total)

In: Biology

Brent Robertson and his banker were reviewing the quarterly income statements for his consulting business, Robertson...

Brent Robertson and his banker were reviewing the quarterly income statements for his consulting business, Robertson and Associates, Inc. The banker was impressed with the growth of sales revenue and net income for the second quarter of this year compared with the second quarter of last year. Brent knew it had been a good quarter, but he didn't think it had been spectacular. Suddenly, Brent realized that he failed to close out the revenue and expense accounts for the prior quarter, which ended in March. Because those temporary accounts were not closed out, their balances were included in the second quarter amounts for the current year. Brent then realized that the banker had the financial statements but not the general ledger or any trial bal- ances. Thus, the banker would not be able to see that the accounting cycle from the first quarter was not properly closed and that this failure was creating a misstated income statement for the second quarter of the current year. The banker then commented that the business seemed to be performing so well that he would approve a line of credit for the business. Brent decided to not say anything because he did not want to lose the line of credit. Besides, he thought, it really did not matter that the income statement was misstated because his business would be sure to repay any amounts borrowed.

Should Brent have informed the banker of the mistake made? should he have redone the second quarter's income statement ? was Brent's failure to close the prior quarter's revenue and expense accounts unethical? Does the fact that the business will repay the loan matter?

In: Accounting

1. If all the letters of the word ABOUT are arranged at random in a line,...

1. If all the letters of the word ABOUT are arranged at random in a line, find the probability that the arrangement will begin with AB...

2.   

The odds of throwing two fours on a single toss of a pair of dice is 1:35
What is the probability of not throwing two fours? (Hint: there are 2 conversions here)

All answers are written as fractions for consistency....

Select one:

a. 35/36

b. 1/36

c. 1/35

d. 35/1

In: Math