In  python langauge.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter4: Selection Structures
Section4.1: Selection Criteria
Problem 4E
icon
Related questions
Question

In  python langauge.

(Science calculate energy) Write a python program that calculate the energy needed to heat water from
an initial temperature to a final temperature. Your program should prompt the user to enter the amount
of water in kilograms and the initial and final temperatures of the water. The formula to computer the
energy is.
Q= M + (finalTemperature - initialTemperature) + 4184
Where M is the weight of water in kilogram, temperatures are degrees Celsius, and energy Q is
measured in joules. Here is a sample run:
Enter the amount of water in kilograms: 55.5
Enter the initial temperature: 3.5
Enter the final temperature: 10.5
The energy needed is 1625484.0
Transcribed Image Text:(Science calculate energy) Write a python program that calculate the energy needed to heat water from an initial temperature to a final temperature. Your program should prompt the user to enter the amount of water in kilograms and the initial and final temperatures of the water. The formula to computer the energy is. Q= M + (finalTemperature - initialTemperature) + 4184 Where M is the weight of water in kilogram, temperatures are degrees Celsius, and energy Q is measured in joules. Here is a sample run: Enter the amount of water in kilograms: 55.5 Enter the initial temperature: 3.5 Enter the final temperature: 10.5 The energy needed is 1625484.0
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Top down approach design
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning