Time Travel Destination Calculator

Beginner

In this project, you will learn how to build a time travel destination calculator using Python. This calculator will help you determine the maximum past and future dates that a time-traveling spaceship can reach based on the current date and the estimated number of days the spaceship can travel.

Python

Introduction

In this project, you will learn how to build a time travel destination calculator using Python. This calculator will help you determine the maximum past and future dates that a time-traveling spaceship can reach based on the current date and the estimated number of days the spaceship can travel.

👀 Preview

## Input:
time_travel_destination('2238-2-11', 30)
time_travel_destination('2238-2-11', 0)
time_travel_destination('2238-2-11', 100)

## Output:
['12-01-2238', '13-03-2238']
['11-02-2238', '11-02-2238']
['03-11-2237', '22-05-2238']

ðŸŽŊ Tasks

In this project, you will learn:

  • How to extract date information from a given string
  • How to calculate the past and future dates based on the given number of days
  • How to format the calculated dates and return them as a list of strings

🏆 Achievements

After completing this project, you will be able to:

  • Understand how to work with dates and timedelta in Python
  • Implement a function to calculate the time travel destination
  • Handle exceptions and edge cases in your code
  • Write clean and maintainable Python code

Teacher

labby

Labby

Labby is the LabEx teacher.