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 19 Solutions
THINKING LIKE AN ENGINEER W/ACCESS
- Please help, this for Matlab the image is the first question with following 2 and 3 they go together. 2. Solving the question by using bisection.m with the stopping criterion at 1%. Report the root and # of iterations. 3. by using newton-Raphson matlab script with the stopping criterion at 0.1%. Report the root and # of iterations.arrow_forwardHaving a diffilcult time solving for the three variables at oncearrow_forwardApplying principles of dynamics (written detailed solution please tysm!) The displacement of a particle which moves along the x axis is given by x = (-4 + 3t2)e-0.25t, consider x to be in feet and t in seconds. Plot the displacement, velocity and acceleration for the first 20 seconds of motion and determine, both graphically and by your established equation for acceleration, the time at which acceleration is 0. (If you find it more comfortable to practice, you may choose to graph using excel or any graphing software, solutions however must be done manually).arrow_forward
- As the potential across the resistor increased, the current through the resistor increased. If the change in current is proportional to the voltage, the data should be in a straight line and it should go through zero. In these two examples how close is the y-intercept to zero? Is there a proportional relationship between voltage and current? If so, write the equation for each run in the form potential = constant x current. (Use a numerical value for the constant.)arrow_forwardUse your matrix number by adding the last three digits to get the value of X on the velocityof plane A. The value of X will then need to be added with the digit of 150 as follows;Example; If your matrix number is AD190251,Velocity of plane A, VA = 150 + X km/hX = (2 + 5 + 1) = 8Therefore, the velocity of plane A, VA = 150 + X, = 150 + 8 = 158 km/h. SO MY LAST THREE DIGITS ARE: 008arrow_forward6.1Complete the code please.arrow_forward
- Please solve question 16-109 below this in the follwoing way: Please include a kinamatic diagram (one for velocity and one for acceleration). Please DO NOT solve this using velocity analysis (cartesian vector analysis). I would like it to be solved using scalar method. We dont use 3D in this course. We only use scalar analysis for the relative velocity equation (writing the x and y components of the equation and solving the equations for the unknowns). I have attached a sample question with solution in order to get an idea on how to use the scalar method to solve my question. I would like question 16-109 to be solved in a similar way. Thank you for your understanding. If you can solve it as soon as possible that would be great and I will give you a thumps up and positive feedback :)arrow_forwardHi. I am trying to practice this problem using a checker online, but everytime I recalculate my answer it always says it's incorrect. So far I have calculated and tried to input the following values: 0.0342 m3/s and 0.0555 m3/s but it always keeps saying they are incorrect. Am I missing a sign change? (Should the answer be negative?) Or am I solving this incorrectly and getting the wrong value each time? Please help show me the correct steps on how to get the correct answer as I am trying to learn this process. Thank you!arrow_forwardsolve by assuming a value of ζ of 0.5 and plot X/Y vs r and then solve for K and C based on r and ζ. Then plot using the given MATLAB codearrow_forward
- Using graphical method solve this problem: Suppose you first walk A in a direction of B west of north then C in a direction D south of west. You rest for 20 minutes and started to compute the distance you traveled. Take A, B, C and D found in the table below. (You may use scale such as 1cm = 2m in your drawing) C. What is the angle between AC ? D. What is the angle between your first walk A to the resultant R?arrow_forwardHi. I am trying to practice this problem using a checker online, but everytime I recalculate my answer it always says it's incorrect. So far I have calculated and tried to input the following values: 0.0342 m3/s, 0.0358 m3/s, 0.04277 m3/s, and 0.0555 m3/s but it always keeps saying they are incorrect. Please help show me the correct steps on how to get the correct answer as I am trying to learn this process. Thank you!arrow_forwardHello pls solve it fast and correctly, you can verify the answer by looking at the third answer which is correct so u can verify and pls do all the three parts and fast I'll ratearrow_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