Instructions Create a program that will announce a rocket launch starting between T-Minus 5 seconds to T-Minus 80 seconds using only for loops or if statements allowed. A method will be used to...


Instructions

Create a program that will announce a rocket launch starting between T-Minus 5 seconds to T-Minus 80 seconds using only for loops or if statements allowed. A method will be used to determine the message that should be returned as part of the launch count down announcement. You will be recreating the approximate launch announcements using the a method.

Tasks



  1. Modify the count_down() method to make a decision on what to return based on the sample output

  2. Manually test the program using 30 seconds as your starting point

  3. Modify the for loop range() to allow it to loop through a set of values




Method count_down(): Method Requirements



  • Function count_down() must accept 1 argument

  • Loops are not allowed inside the method

  • You must return the appropriate response or None based on your decision

  • Only 1 return statement is allowed inside the method




Method count_down(): Decision Requirements



  • You must use if elif else statements to decide which value should be returned

  • Individual seconds between -10 to 0 seconds must be output by a single print() statement

  • Other custom messages must be in their own decision statement




Main Program: Loop Requirements



  • Only one for loop is allowed in the main program at Task 3

  • Test the loop to start anywhere between T-Minus 15 seconds before launch to T-Minus 60 seconds before launch

  • Test using both user input and the provided unit test

  • The count down will return a series of T Minus messages at T-Minus 15, T-Minus 30, and T-Minus 60 seconds

  • The count down will not return an individual second except between T-Minus 10 to 0 seconds and 1 - 5 seconds after launch

  • The count down will always positive numbers for individual seconds, even if the number is negative value in the decision calculation




Watch a Real Rocket Launch

The URL below will take you to the SpaceX Launch for Crew Dragon Demo-2. It is queued up at just a minute before launch so you can hear what the announcer is saying. This will give you the idea of what a count down for a rocket launch sounds like.
https://youtu.be/xY96v0OIcK4?t=15704

Sample Input



30




Sample Output



T-30 Seconds T-15 Seconds 10 9 8 7 6 5 4 3 2 1 0 Ignition Lift off 1 2 3 4 5 Dragon has cleared the tower

Oct 13, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here