Concept explainers
Write a function named CountDown that accepts a total time T in seconds and displays the time remaining after half of the previously displayed time has elapsed as described below. The function should also accept an integer Steps as also described below.
The function should immediately display the value of T, and then wait T/2 seconds before displaying T/2. It should then wait T/4 seconds and display T/4, etc. This should continue until only 1/2Steps of the original time remains, at which point it waits for this remaining time, displays a zero, and emits an audio tone.
It is suggested that you look up the pause function and the beep function.
Example: CountDown (60, 6) displays the following by an audio tone.
60 | Displayed immediately |
30 | Displayed 30 seconds later |
15 | Displayed 15 seconds later |
7.5000 | Displayed 7.5 seconds later |
3.7500 | etc. |
1.8750 | etc. |
0.9375 | etc. |
0 | Displayed 0.9375 seconds later accompanied by a beep |
Trending nowThis is a popular solution!
Chapter 20 Solutions
Thinking Like an Engineer: An Active Learning Approach (3rd Edition)
- A person by the name of Huebscher developed a relationship between the equivalent size of round ducts (in air conditioning applications) and rectangular ducts according to (ab) 0.625 (a + b)0.25' D = 1.3- Side of Rectangular Du 400 450 500 550 600 diameter of equivalent circular duct (mm) dimension of one side of the rectangular duct (mm) dimension of the other side rectangular duct (mm) Use VBA to create a custom-made dialog box to return values that shows the relationship between the circular and the rectangular duct dimensions, such as the values of D that would be entered into the table shown below. Length of one side of rectangular duct (length a), mm 125 150 175 122 133 143 122 133 143 122 133 143 122 133 143 122 133 143 where we have the following: D= 100 109 109 109 109 109 a= b= 200 152 152 152 152 152 Calculate Diameterarrow_forwardCreate an illustration or diagram of the amusement park ride called THE BUMPER CAR RIDE, then proceed to add labels based on the guidelines provided within the image. The screenshot is the example of the diagram BUT THAT IS A DIAGRAM OF THE GRAVITRON RIDE. I need an illustration DIAGRAM OF THE BUMPER CAR RIDE, do not answer using AI.arrow_forwardDon't Use Chat GPT Will Upvote And Give Handwritten Solution Pleasearrow_forward
- Please help solve the question shown. I attempted this problem over five times and it keeps saying my answers are wrong. I typed 11.1hr, 1.11hr, 8.67hr, 6.9384hr, and 7.1152hr but it keeps saying that those are all incorrect. Can you please show how to get the correct answer so I can understand how to solve it? Thank you!arrow_forwardshow all stepsarrow_forwardI need help with simulink. It is my first time using simulink. I am trying to make a simulink program turning on the LED on the board for 10sec for an Arduino Mega 2560. I have attached an image of what I tried to do. After I run, it just says no diagnostic. How do I know if I did this correctly or not?arrow_forward
- READ THE INSTRUCTIONS!!! DO NOT ANSWER THIS IF YOU ALREADY ANSWERED. I WILL DOWNVOTE. ANSWER THIS COMPLETE, CORRECT, TYPEWRITTEN. I WANT IT TO BE DIGITALLY ANSWERED NOT HANDWRITTEN. I WILL UPVOTE IF YOU MEET THESE.arrow_forward5. Please give the definition and syntax for G00 and G28, and draw the toolpath and mark the passing point coordinate positions in XOY coordinate plane in the following two pictures separately after the code blocks being executed. G00 X6.0 Y3.0 Finish postion(6,3) Start postion (0,0) G91 G28 X0.0 Z2.0 Home postion (6,3) Start postion (0,0)arrow_forwardPlease draw 5 and 6arrow_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