QUESTION 1 Write a complete program that consists of the main function that will call 4 user-defined functions. The task of each function is described below. The first function is to display your information such as: Full Name Matrix No 1. a. b. C. Group 2. The second function is to display a Plagiarism Declaration statement "I confirm that this LAB TEST is my own work and is not copied from 3. The third and the fourth functions are based on the following problem Sound travels through the air because 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 x Tc Write a function that allows the user to input a starting and an ending temperature. Within this temperature range, another function pass by value should output the temperature and the corresponding velocity in 1° increments using a do-while loop. For example, if the user entered 0 as the start temperature and 2 as the end temperature then the program should output: =

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
Question
QUESTION 1
Write a complete program that consists of the main function that will call 4
user-defined functions. The task of each function is described below.
1.
The first function is to display your information such as:
Full Name
a.
b.
Matrix No
Group
2.
The second function is to display a Plagiarism Declaration statement
"I confirm that this LAB TEST is my own work and is not copied from
3.
The third and the fourth functions are based on the following problem
Sound travels through the air because 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:
C.
Velocity = 331.3 + 0.61 × Tc
Write a function that allows the user to input a starting and an ending
temperature. Within this temperature range, another function pass by value
should output the temperature and the corresponding velocity in 1° increments
using a do-while loop. For example, if the user entered 0 as the start
temperature and 2 as the end temperature, then the program should output:
At 0-degree Celsius the velocity of sound is 331.3 m/s
At 1-degree Celsius the velocity of sound is 331.9 m/s
At 2-degree Celsius the velocity of sound is 332.5 m/s
Figure 1: Sample output display
Global variables are not allowed to be used in your program. You can be
creative to display the output program and not limited to above Figure 1. Your
program should allow the user to repeat the process as often as the user
wishes until he/she wants to exit the program.
Transcribed Image Text:QUESTION 1 Write a complete program that consists of the main function that will call 4 user-defined functions. The task of each function is described below. 1. The first function is to display your information such as: Full Name a. b. Matrix No Group 2. The second function is to display a Plagiarism Declaration statement "I confirm that this LAB TEST is my own work and is not copied from 3. The third and the fourth functions are based on the following problem Sound travels through the air because 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: C. Velocity = 331.3 + 0.61 × Tc Write a function that allows the user to input a starting and an ending temperature. Within this temperature range, another function pass by value should output the temperature and the corresponding velocity in 1° increments using a do-while loop. For example, if the user entered 0 as the start temperature and 2 as the end temperature, then the program should output: At 0-degree Celsius the velocity of sound is 331.3 m/s At 1-degree Celsius the velocity of sound is 331.9 m/s At 2-degree Celsius the velocity of sound is 332.5 m/s Figure 1: Sample output display Global variables are not allowed to be used in your program. You can be creative to display the output program and not limited to above Figure 1. Your program should allow the user to repeat the process as often as the user wishes until he/she wants to exit the program.
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Variables
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
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education