0

Please guys could smw do this for me ?

As the final part of our toolbox, we want to handle the user's input in a more convenient way. THE RULES ARE AS FOLLOW: One string input per calculation: Instead of asking for different variables one after the other, the user will enter all the variables needed for the calculation separated by a comma. Automatic unit conversion: Our program uses the SI (International system) units for its calculation and outputs. However, for more convenience, we want to offer the user the possibility of entering their parameters both in SI units and Imperial (American units). The values and the units are separated by a space. EXAMPLE: (Flow rate calculation) text Copier le code enter the Area A (feet^2 or m^2), and the velocity (m/s or ft/s) to calculate the flow rate: 10 ft^2, 300m/s In this case, the area should be converted to m². The velocity will be directly assigned since it's already in an SI unit. If the user enters a variable in SI unit, no conversion is needed. The calculation output should be in SI unit. Useful functions: split() - split() is used to split a string into various ways (For more information, check this out). Conversion Table from Imperial unit to SI units: Quantity SI Unit Imperial Unit Conversion Factor Flow Rate (Q) m³/s ft³/s 1 m³/s = 35.3147 ft³/s Area (A) m² ft² 1 m² = 10.7639 ft² Velocity (v) m/s ft/s 1 m/s = 3.28084 ft/s Pressure (P) Pa (N/m²) psi (lbf/in²) 1 Pa = 0.000145038 psi Volume (V) m³ ft³ 1 m³ = 35.3147 ft³ Force (F) N (kg·m/s²) lbf 1 N = 0.224809 lbf Length (L) m ft 1 m = 3.28084 ft Stress (σ) Pa (N/m²) psi (lbf/in²) 1 Pa = 0.000145038 psi Strain (ε) Dimensionless Dimensionless No conversion needed Voltage (V) V (volt) V (volt) No conversion needed Current (I) A (ampere) A (ampere) No conversion needed Resistance (R) Ω (ohm) Ω (ohm) No conversion needed Power (P) W (watt) hp (horsepower) 1 W = 0.00134102 hp Temperature (T) K (Kelvin) °F (Fahrenheit) K = (°F - 32) × 5/9 + 273.15 Mass (m) kg lbm (pound-mass) 1 kg = 2.20462 lbm

17th Dec 2024, 5:16 PM
Raymane Elassli
Raymane Elassli - avatar
2 ответов
+ 3
unfortunately, this is not a home-work writing service! read the rules, and practice those. thanks! (these are easy tasks, your search engine and/or code editor/ide will help you a lot)
17th Dec 2024, 6:44 PM
Mihaly Nyilas
Mihaly Nyilas - avatar
+ 2
No-one
17th Dec 2024, 6:44 PM
A͢J
A͢J - avatar