Write a program that does the following:
-
gets today's date and stores it in a variable
'date'
-
uses today's date to get the name on the day of the week written in short form with the first letter capitalized eg.
'Fri'
if today were Friday and assigns it a variable'day'
-
uses if statements to determine the today's fare following these bus fare schedule:
- monday - friday --> 100
- saturday --> 60
- sunday --> 80
-
Prints the results in this format
Date: 2021-01-05
Day: Tue
Fare: 100
Run the Checker file to evaluate your code. If all tests pass, your code will be the correct solution. If any fail, check the error messages and make changes to your code and repeat.
- Your solution must be written in the bus_fare_challenge file and its name should never be changed.
- Your program must make use of the following variable names:
'date'
'day'
'fare'
Failure to which all your tests will fail.
- The Checker file should never be altered at any cost.
- import the date module from python library
- assign today's date to the variable
'date'
- assign todays dayname to the vriable
'day'
- create a string with all days of the week
- assign the value of fare to each day of the week