Concept explainers
Sound travels through air as a result of collisions between the molecules in the air. The temperature of the air affects the speed of the molecules, which in turn affects the speed of sound. The velocity of sound in dry air can be approximated by the formula:
velocity ≈ 331.3 + 0.61 × Tc
where Tc is the temperature of the air in degrees Celsius and the velocity is in meters/second.
Write a
At 0 degrees Celsius the velocity of sound is 331.3 m/s
At 1 degrees Celsius the velocity of sound is 331.9 m/s
At 2 degrees Celsius the velocity of sound is 332.5 m/s
Trending nowThis is a popular solution!
Chapter 2 Solutions
Problem Solving with C++ (9th Edition)
Additional Engineering Textbook Solutions
Computer Science: An Overview (13th Edition) (What's New in Computer Science)
Starting Out With Visual Basic (7th Edition)
Starting Out with Python (4th Edition)
Java How to Program, Early Objects (11th Edition) (Deitel: How to Program)
Modern Database Management
- A piece of wire is to be bent in the form of a circle to put around a picture frame. Write a program that prompts the user to input: The length of the wire The program then outputs: the radius and area of the circle. You may assume that π = 3.1416. Declare PI as a named constant with this valuearrow_forwardThe screen size of a TV is given by the length of the rectangular diagonal. Traditional TVs come in 4:3 ratio, that is, the ratio of length to width is 4 to 3. This means, if the length is x inches, then the width is (3/4)x. LCD TVs come in 16:9 ratio. Write a program that prompts the user to input the length of the diagonal (in inches) of the screen and allows the user to select which type of TV’s screen length, screen width, and screen area the user would like to calculate. Have the program display the desired results.arrow_forwardYou arrive in front of a bridge that you must cross to reach a village before dark. Crossing the bridge is not free - the bridgekeeper asks you to roll two dice to determine the cost. You decide to write a program to verify that he is charging the right price. Your program should read two integers, between 1 and 6, representing the values of each die. If the sum is greater than or equal to 10, then you must pay a special fee (36 coins). Otherwise, you pay twice the sum of the values of the two dice. Your program must then display the text "Special tax" or "Regular tax" followed by the amount you have to pay on the next line.arrow_forward
- Given an airplane's acceleration and take-off speed v, you can compute the minimum runway length needed for an airplane to take off using the following formula. length=v^2/2*a. write a program that prompts the user to enter V in meters and acceleration an in meter/second and display the minimum runway length.arrow_forwardA mass m is attached to the end of a rope of length r 3 meters. The rope can only be whirled around at speeds of 1, 10, 20, or 40 meters per second. The rope can with stand a maximum tension of T = 60 Newtons. Write a program where the user enters the value of the mass m, and the program determines the greatest speed at which it can be whirled without breaking the rope. Assume that the mass m is less than 100 kg. Hint: T = mv2 /r. Drop Your Code here: #Set the rope length #Set the maximum tension #Set the message #Read the mass value #Set a list of possible rotation speed #Set the size of the list Drag your statements from the following choices: length = 3 max_tension = 60 message = "The greatest speed without breaking the rope is:" mass = float(input(">>>Enters the value of the mass m: ")) rotation_speed - [1. 10, 20, 40] N= len(rotation_speed) pos - N-1 for i in range (N): tension = mass"rotation_speed[i)*2/length if tension>max tension: pos i-1 break…arrow_forwardWhen Jacob Steinberg began his trip from California to Vermont, he filled his car’s tank with gas and reset its trip meter to 0. After traveling 324 miles, Jacob stopped at a gas station to refuel; the gas tank required 17 gallons. Jacob wants a program that calculates and displays his car’s gas mileage at any time during the trip. The gas mileage is the number of miles his car can be driven per gallon of gas. Desk-check your solution’s algorithm using 324 as the number of miles driven and 17 as the number of gallons used; then desk-check it using 280 and 15.arrow_forward
- A county collects property taxes on the assessment value of property, which is 60 percent of the property’s actual value. If an acre of land is valued at $10,000, its assessment value is $6,000. The property tax is then 75¢ for each $100 of the assessment value. The tax for the acre assessed at $6,000 will be $45. Write a program that asks for the actual value of a piece of property and displays the assessment value and property tax.arrow_forward4. Write a Phyton program that computes the speed of sound (a) in air of a given temperature T (°F ). Use the formula 5T+2297 2457 a = 10861arrow_forwardIn physics, an object that is in motion is said to have kinetic energy. The follow. formula can be used to determine a moving object’s kinetic energy: KE = (1/2 mv²) Where KE =the kinetic energy m= the object's mass in kilograms v = the object's velocity in meters per second. %3D Write a program to calculate the amount of kinetic energy that the object has wh given the object's mass (in kilograms) and velocity (in meters per second). Here sample run: Input the object's mass (kg):10.0 Input the object's velocity (m/s): 5 The kinetic energy (Joules): 125arrow_forward
- π can be computed using the following formula: π = 4 x ( 1 - 1/3 + 1/5 - 1/7 + 1/9 - 1/11 + . . . ) Write a program that displays the result of 4 x ( 1 - 1/3 + 1/5 - 1/7 + 1/9 - 1/11 ) and 4 x ( 1 - 1/3 + 1/5 - 1/7 + 1/9 - 1/11 +1/13 - 1/15 )arrow_forwardWrite a program that converts Celsius temperatures to Fahrenheit temperatures. The formula is as follows:F= 9/5C + 32The program should ask the user to enter a temperature in Celsius, and then display the temperature converted to Fahrenheit.arrow_forwardGiven an airplane’s acceleration a and take-offspeed v, you can compute the minimum runway length needed for an airplane totake off using the following formula:length =v2/2aWrite a program that prompts the user to enter v in meters/second (m/s) and theacceleration a in meters/second squared (m/s2), then, displays the minimum runwaylength. Here is a sample run: Enter speed and acceleration: 60 3.5The minimum runway length for this airplane is 514.286arrow_forward
- C++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage Learning