Question

In: Computer Science

Chapter 6, Starting out with Programming and Logic, 4th Edition, Page 265 #6 Kinetic Energy In...

Chapter 6, Starting out with Programming and Logic, 4th Edition, Page 265 #6 Kinetic Energy

In physics, an object that is in motion is said to have kinetic energy. The following formula can be used to determine a moving object’s kinetic energy:

KE=12mv2

The variables in the formula are as follows: KE is the kinetic energy, m is the object’s mass in kilograms, and v is the object’s velocity, in meters per second. Design a function named kineticEnergy that accepts an object’s mass (in kilograms) and velocity (in meters per second) as arguments. The function should return the amount of kinetic energy that the object has. Design a program that asks the user to enter values for mass and velocity, and then calls the kineticEnergy function to get the object’s kinetic energy. PLEASE CREATE A FLOWCHART USING FLOWGORITHM. PLEASE PROVIDE SCREENSHOTS OF FLOWCHART AND TEST RUN.

Solutions

Expert Solution

Answer:

Here is the python code as per your requirment

Raw code:

def kineticEnergy(m,v):

'''

KE is the kinetic energy,

m is the object’s mass in kilograms,

v is the object’s velocity, in meters per second.

'''

KE=1/2*(m*v*v)

#returning the kinetic enerty

return KE

#main

def main():

#asking the mass and velocity to user

mass=float(input("Enter the mass(kgs): "))

velocity=float(input("Enter the velocity(mts): "))

#printing the output

print(kineticEnergy(mass,velocity))

#calling main function

main()


Raw code:

ouptut:

Hope this helps you! If you still have any doubts or queries please feel free to comment in the comment section.

"Please refer to the screenshot of the code to understand the indentation of the code".

Thank you! Do upvote.


Related Solutions

'an inside look' article page 118-119 chapter 4, essentials of economics 4th edition, Thinking critically question...
'an inside look' article page 118-119 chapter 4, essentials of economics 4th edition, Thinking critically question 1.The article implies that the demand for alcopops is price elastic due to the availability of substitutes, such as alcoholic cider. Can we infer that the demand for all alcoholic drinks is also price elastic? Explain. 2.Given your response to question 1, do you think that taxing the sales of alcoholic drinks is an effective policy to reduce alcohol abuse? Explain why or why...
Starting Out with Java (6th Edition) chapter 8, 3PC Requirement: Each of the RoomCarpet and RoomDimension...
Starting Out with Java (6th Edition) chapter 8, 3PC Requirement: Each of the RoomCarpet and RoomDimension classes should have a toString method, an equals method, a copy method, and a copy constructor. The RoomCarpet class should have mutators and accessors for both of its fields.
Java Programming 5th edition Chapter 10 Inheritance Programs Part 1 Number 3 on page 719 which...
Java Programming 5th edition Chapter 10 Inheritance Programs Part 1 Number 3 on page 719 which creates a Point class with 2 instance variables; the xCoordinate and yCoordinate. It should have a default constructor and a values constructor. Also include a set method that sets both attributes, a get method for each attribute, and a method that redefines toString() to print the attributes as follows. point: (x, y) Part 2 Do number 4 on page 719 which creates a Circle...
Using the Chapter 7 - User Guide to the PMBOK 4th edition - Project Cost Management...
Using the Chapter 7 - User Guide to the PMBOK 4th edition - Project Cost Management course material as a guide and the Earned Value (EV) formulas described in the example problem, answer the questions below by showing your calculations and solutions for each project parameter. Our 6-month project example is described as follows: Total Hours of Work:  1,100 Hours Cost per Hour:  $185 per hour Project cost at end of month three: $110,000 Estimated work complete at end of month three:...
guide to unix using linux / 4th edition / chapter 2 / p10 2.10 Assume that...
guide to unix using linux / 4th edition / chapter 2 / p10 2.10 Assume that you work for a company that is developing a telephone database and you are creating directories for the Mail and Receiving Departments, which are referenced in the company’s budget and accounting systems as departments 4540 and 4550. After you create the directories, you begin creating files of department phone numbers to store in those directories. You must use the mkdir (make directory) command to...
Please refer to the question from textbook Stats: Data and Models 4th Edition, Chapter 4, Exercises,...
Please refer to the question from textbook Stats: Data and Models 4th Edition, Chapter 4, Exercises, Section 4.5 Chapter exercises #22 Camp Sites, part (b): How many parks would you classify as outliers ? Explain
Cognitive Psychology: Applying The Science of the Mind (4th Edition) Chapter 10 Discussion Question: What do...
Cognitive Psychology: Applying The Science of the Mind (4th Edition) Chapter 10 Discussion Question: What do you think is the most important factor in communicating through your writing? Think of the comments you get from professors, or the problems you seem to have in writing. Do they map onto any of the factors you've read about? Here's an example of one of my classmate response.... I feel that with writing being such a common way of communicating it is important...
Elementary Principles of Chemical Engineering, 4th edition, Chapter 4, question 20 a 100 km/hr stream that...
Elementary Principles of Chemical Engineering, 4th edition, Chapter 4, question 20 a 100 km/hr stream that is 97 % mole carbon tetrachloride CCl4 and 3 % carbon disulfide CS2 is to be recovered from the bottom of a distillation column. the feed to the column is 16 mole% CS2 and 84% CCl4, and 2% of the CCl4 entering the column is contained in the overhead stream leaving the top of the column. A) draw and label a flowchart of the...
. In a device (figure 30-6) that is used to measure the maximum kinetic energy of...
. In a device (figure 30-6) that is used to measure the maximum kinetic energy of photoelectric effect electrons, the voltage difference between the collector and emitter is increased until the current flowing through the circuit goes to zero. This is called the stopping potential and the KEmax can be very simply calculated if you use electron-volts. Using this device, you measure this voltage to be 0.710 V for electrons emitted from a surface illuminated by 492-nm light. Then, when...
For Crafting and Executing Strategy, The Quest for Competitive Advantage 22nd Edition: Chapter 4, Page 117-119-...
For Crafting and Executing Strategy, The Quest for Competitive Advantage 22nd Edition: Chapter 4, Page 117-119- Assurance of Learning Exercises 1.) Using the financial ratios provided in table 4.1 and following the financial statement information presented for Urban Outfitters, Inc., calculate the following ratios for Urban Outfitters for both 2016 and 2017: a.Gross Profit Margins, b.Operating profit margin, c.Net Profit margin, d.Times-interest-earned(or coverage) ratio, e.Return on Stockholders'equity, f.Return on assets, g.Debt-to-equity ratio, h.Days of inventory, i.Invemtory turnover ratio, j.Average collection...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT