Question: Time on Mars is easily divided into days based on its rotation rate and years based on its orbit. Sols, or Martian solar days, are
Time on Mars is easily divided into days based on its rotation rate and years based on its orbit. Sols, or Martian solar days, are only 39 minutes and 35 seconds longer than Earth days, and there are 668 sols (687 Earth days) in a Martian year (2026 through 2028) help me with a program that takes a date as input and outputs the date's season in the northern hemisphere of Mars. The input is an int representing the year, a string to representing the month and an int representing the day. Because seasons in Mars change every ~2 years, the only valid dates we are going to allow here are September 30, 2026 through August 17, 2028. Ex: If the input is: 2027 April 10 the output is: Spring In addition, check if the string and int are valid (an actual year, month and day) as follows: Ex: If the input is: 2031 Blue 32 the output is: Invalid year Invalid month Invalid day Finally, if the year, month and day inputs are valid (with in the range, etc) but they are outside of the dates below (before 9/30/2026 or after 08/17/2028), output 'Invalid input combination'. For example, if the input is: 2026 July 01 The output is: Invalid input combination The dates for each season in the northern hemisphere of Mars are: Recommended Code Plan if generated_string >= _SPRING_EQUINOX and generated_string < _SUMMER_SOLSTICE: [...] 6. If the dates are out of range, print "Invalid input combination"
Step by Step Solution
3.45 Rating (152 Votes )
There are 3 Steps involved in it
Python Define a dictionary to map month names to month numbers monthtonumber January 01 Februar... View full answer
Get step-by-step solutions from verified subject matter experts
