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, Student Value Edition (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_forwardI 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_forward
- Could 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_forwardDon't Use Chat GPT Will Upvote And Give Solution In 30 Minutes Pleasearrow_forward
- Your choices from the drop down menu are "1, 2.5, and 3.5" Please see both images for reference. Thanks!arrow_forwardI need help in the following MATLAB code. How do I add the code to answer the following question "Do you find more object detections in the image than the one that is cropped out? Explain how you would discriminate that from a dead pixel, a hot pixel, or a cosmic ray event." fname = '00095337.fit'; fInfo = fitsinfo(fname); img = fitsread(fname); % Crop the image to show just the object: img_cropped = img(1980:2030,1720:1780); % Load the labeled image img_labeled = imread('00095337_labeled_stars.png'); img_labeled = img_labeled(102:863,605:1363,:); % Get rid of "hot" pixels (cosmic rays, disfunctional pixels) max_acceptable_value = 1300; img(img>max_acceptable_value) = max_acceptable_value; % Plot the images f1 = figure(); tgroup1 = uitabgroup('Parent',f1); tab(1) = uitab('Parent', tgroup1, 'Title', 'Raw image'); ax(1) = axes('parent',tab(1)); imagesc(img) axis equal axis([0,size(img,2),0,size(img,1)]+0.5) colormap(gray(256)); xlabel('x [px]') ylabel('y [px]')…arrow_forwardHello tutors, help me. Just answer "Let Us Try"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