Create a written algorithm and flowchart to determine if a material is in the solid, liquid, or gaseous state given the temperature. The algorithm should acquire the name of the material, its freezing and boiling temperatures, and the actual temperature of the material from the user.
Write an algorithm that determines the state of a material at a given temperature for user specified material, freezing point and boiling point.
Explanation of Solution
Known:
- If the temperature is below freezing point, the material is in solid state.
- If the temperature is above the boiling point, the material is in gaseous state.
Unknown:
- The type of the material.
- The freezing point of the material.
- The boiling point of the material.
Assumptions:
- Assume that the interpreter of the algorithm will input the type of material, freezing point of the material, boiling point of the material and the temperature of the material.
Algorithm:
- Input the type of material, the numerical value of freezing point of the material, boiling point of the material and the temperature of the material.
- Ask if the temperature of the material is less than the freezing point.
-
- a. If yes, state of the material is Solid.
- b. If no, ask if the temperature of the material is greater than the boiling point.
- 1. If yes, the state of the material is Gas.
- 2. If no, the state of the material is Liquid.
- Display the type of the material and the state of the material at the given temperature.
- End the process.
Rules for creating a proper linear flowchart are as follows.
- The flowchart contains START rectangle to mention the beginning of a process.
- All the actions must be mentioned within rectangles.
- Connection between the blocks must be mentioned with a one-directional arrow.
- The flowchart contains END rectangle to mention the end of a process.
Flowchart to determine the state of a material is given in Figure 1.
Conclusion:
Hence, the algorithm and the flowchart that determines the state of a material at a given temperature are created.
Want to see more full solutions like this?
Chapter 18 Solutions
Thinking Like an Engineer: An Active Learning Approach (4th Edition)
- Motiyo Add explanationarrow_forward2:01 ul 4G 4. A sulms.su.edu.om While constructing a building, an engineer need to fix two steel beams together using a bracket as shown in Figure 1. Using absolute coordinate system, construct a G-code program for drilling hole number 3 only. To remove the metal chips the hole should be done in three equal steps. During the drilling, coolant should be on before spindle starts and stop after spindle stops. The spindle speed set to 1750 RPM. Drilling bit in rack number 2 and it should be 1 mm over the work piece. Drilling feed rate is 20 mm/min. Explain each code used in the program in a column 57.5- 12.5 Hole (4) Hole (3) 30 Hole (1) Hole (2) ΧΟ Υ0ΖΟ All dimensions shown are in mm Figure 1 B. -> 28 •..arrow_forwardEngr 215 Matlab Fahrenheit to Celsius using multiple statements Given a Fahrenheit value temperatureFahrenheit, write a statement that assigns temperatureCelsius with the equivalent Celsius value. While the equation is C = 5/9 * (F - 32), as an exercise use two statements, the first of which is "fractionalMultiplier = 5/9;"]arrow_forward
- Helparrow_forwardDon't copy paste someone else answer if I get to know I'll report and downvote too do on your own and only handwritten with proper steps not that handwritten onlyarrow_forwardNewton's Law of cooling states that the rate at which heat is lost by a heated body is proportional to the difference in temperature between the body and the surrounding medium. Match the following statements/phrases with the corresponding item in the drop down box. Choices in the box 1. In accordance with the stated law obove, we have the equation? 2. If a thermometer is taken outdoors where the temperoture is 5 deg C, from a room in which the temperature is 20 deg C and the reading drops 10 deg C in one minute, the working equation is? 3. In the obove problem, separoting the variables and integrating will result to? 4. In the obove problem, how long, in minutes, after its removal from the room will the reading be 6 deg C? 5. In the obove problem, ofter 30 seconds, whot will be the thermometer reading? 5.2 dT(body temp)/dt = k(Temp of medium - 5) dr(body temp)/dt = k(Temp of body - Temp of medium) Temp of body = Cenkt +5 2.5 13.7 dr(body temp)/dt = k(Temp of medium - Temp of body)…arrow_forward
- I have uploaded it multiple times and get wrong answer........this time if you know the answer then go ahead otherwise skip for other experts and Need typed solutionarrow_forwardCould you please fix my code it’s supposed to look like the graph that’s on the picture. But the lines do not cross eachother at the beginning. Could you make the lines look like the lines on the graph? Use this code in MATLAB and fix it. % Sample data for Diesel and Petrol cars carPosition = linspace(1, 60, 50); % Assumed positions of cars % Define your seed here seed = 50; rand('seed',seed); % Set the seed for reproducibility % Assumed CO2 emissions for Diesel and Petrol CO2Diesel = 25 + 5*cos(carPosition/60*2*pi) + randn(1, 50)*5; % Random data for Diesel CO2Petrol = 20 + 5*sin(carPosition/60*2*pi) + randn(1, 50)*5; % Random data for Petrol % Fit polynomial curves with a reduced degree of 2 pDiesel = polyfit(carPosition, CO2Diesel, 2); pPetrol = polyfit(carPosition, CO2Petrol, 2); % Generate points for best fit lines fitDiesel = polyval(pDiesel, carPosition); fitPetrol = polyval(pPetrol, carPosition); % Plotting the data figure; hold on; % Plot Diesel best fit line…arrow_forwardThere is a small space between the orange and purple line could you please connect the two lines together also can you please make the purple line shorter and then connect the purple line to the orange line, please take out the box that says “Diesel, petrol, Diesel best fit, petrol best fit”. Also when ever I run this code the graph shows up but there are still errors that comes up could you please fix them when you are running this on MATLAB. Please use this code on MATLAB and fix it. % Sample data for Diesel and Petrol cars carPosition = linspace(1, 60, 50); % Assumed positions of cars % Fix the random seed for reproducibility rng(50); % Assumed CO2 emissions for Diesel and Petrol CO2Diesel = 25 + 5*cos(carPosition/60*2*pi) + randn(1, 50)*5; % Random data for Diesel CO2Petrol = 20 + 5*sin(carPosition/60*2*pi) + randn(1, 50)*5; % Random data for Petrol % Fit polynomial curves pDiesel = polyfit(carPosition, CO2Diesel, 3); pPetrol = polyfit(carPosition, CO2Petrol, 3); % Generate…arrow_forward
- Elements Of ElectromagneticsMechanical EngineeringISBN:9780190698614Author:Sadiku, Matthew N. O.Publisher:Oxford University PressMechanics of Materials (10th Edition)Mechanical EngineeringISBN:9780134319650Author:Russell C. HibbelerPublisher:PEARSONThermodynamics: An Engineering ApproachMechanical EngineeringISBN:9781259822674Author:Yunus A. Cengel Dr., Michael A. BolesPublisher:McGraw-Hill Education
- Control Systems EngineeringMechanical EngineeringISBN:9781118170519Author:Norman S. NisePublisher:WILEYMechanics of Materials (MindTap Course List)Mechanical EngineeringISBN:9781337093347Author:Barry J. Goodno, James M. GerePublisher:Cengage LearningEngineering Mechanics: StaticsMechanical EngineeringISBN:9781118807330Author:James L. Meriam, L. G. Kraige, J. N. BoltonPublisher:WILEY