You are a nasa engineer who needs to monitor the situation every time a probe uses its thrusters. For a given day you are given the planned times when the thruster will be used.  You need to be monitoring the situation at those boost times and for 5 minutes after. You want to figure out if you can take a break for a certain number of minutes.    To achieve this you are given the planned boost times in in hours and minutes with an am/pm. And you are given a desired break time in minutes. Output if you can take the break or not given the monitoring you have to do.   For example: If you know the thruster is fired at 5:00am and 12:50pm. You need to be monitoring the situation from 5:00am to 5:05am and again from 12:50pm to 12:55pm. Apart from those times you are free to take a break. So a 5 minute break is possible. But a 12 hour break is not possible. Note You should assume that the launch times that the user entered would occur in one day. However, you cannot assume that these were inputted in order. For example, in the first case on the screenshot of the assignment, the user entered 11:00am 12:59am 5:02pm 7:02am 8:00pm When you are trying to find the time in between the launch times, you should order them as follows. 12:59am 7:02am 11:00am 5:02pm 8:00pm

Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter7: File Handling And Applications
Section: Chapter Questions
Problem 20RQ
icon
Related questions
Question

You are a nasa engineer who needs to monitor the situation every time a probe uses its thrusters. For a given day you are given the planned times when the thruster will be used.  You need to be monitoring the situation at those boost times and for 5 minutes after. You want to figure out if you can take a break for a certain number of minutes. 

 

To achieve this you are given the planned boost times in in hours and minutes with an am/pm. And you are given a desired break time in minutes. Output if you can take the break or not given the monitoring you have to do.

 

For example:

If you know the thruster is fired at 5:00am and 12:50pm. You need to be monitoring the situation from 5:00am to 5:05am and again from 12:50pm to 12:55pm. Apart from those times you are free to take a break. So a 5 minute break is possible. But a 12 hour break is not possible.

Note

You should assume that the launch times that the user entered would occur in one day. However, you cannot assume that these were inputted in order.

For example, in the first case on the screenshot of the assignment, the user entered
11:00am 12:59am 5:02pm 7:02am 8:00pm

When you are trying to find the time in between the launch times, you should order them as follows.
12:59am 7:02am 11:00am 5:02pm 8:00pm

**Python 3.8.0 Shell Output Overview**

This image displays the output from a Python 3.8.0 Shell session on a Windows 32-bit platform. The script, `test.py`, appears to perform operations based on user-input "boost times" and "wanted break time." The goal is to determine if a break is possible given these inputs.

### Sessions Overview:

1. **First Session:**
   - **Boost Times Entered:** 11:00am, 12:59am, 5:02pm, 7:02am, 8:00pm
   - **Wanted Break Time:** 5 minutes
   - **Outcome:** Break possible

2. **Second Session:**
   - **Boost Times Entered:** 1:00am, 5:00am, 9:00am, 1:15pm, 5:05pm, 9:10pm, 11:50pm
   - **Wanted Break Time:** 120 minutes
   - **Outcome:** Break possible

3. **Third Session:**
   - **Boost Times Entered:** 1:00am, 5:00am, 9:00am, 1:15pm, 5:05pm, 9:10pm, 11:50pm
   - **Wanted Break Time:** 600 minutes
   - **Outcome:** Break not possible

### Key Insights:

- **Boost Times:** Represent specific moments entered by the user.
- **Wanted Break Time:** Desired length of a break in minutes.
- **Break Possible/Not Possible:** The script analyzes whether the requested break time can fit between the specified boost times.

This script likely involves logic to calculate the intervals between boost times and assess if the break can be accommodated.
Transcribed Image Text:**Python 3.8.0 Shell Output Overview** This image displays the output from a Python 3.8.0 Shell session on a Windows 32-bit platform. The script, `test.py`, appears to perform operations based on user-input "boost times" and "wanted break time." The goal is to determine if a break is possible given these inputs. ### Sessions Overview: 1. **First Session:** - **Boost Times Entered:** 11:00am, 12:59am, 5:02pm, 7:02am, 8:00pm - **Wanted Break Time:** 5 minutes - **Outcome:** Break possible 2. **Second Session:** - **Boost Times Entered:** 1:00am, 5:00am, 9:00am, 1:15pm, 5:05pm, 9:10pm, 11:50pm - **Wanted Break Time:** 120 minutes - **Outcome:** Break possible 3. **Third Session:** - **Boost Times Entered:** 1:00am, 5:00am, 9:00am, 1:15pm, 5:05pm, 9:10pm, 11:50pm - **Wanted Break Time:** 600 minutes - **Outcome:** Break not possible ### Key Insights: - **Boost Times:** Represent specific moments entered by the user. - **Wanted Break Time:** Desired length of a break in minutes. - **Break Possible/Not Possible:** The script analyzes whether the requested break time can fit between the specified boost times. This script likely involves logic to calculate the intervals between boost times and assess if the break can be accommodated.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 3 images

Blurred answer
Knowledge Booster
Processes of 3D Graphics
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
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning