Question: using python set a string variable to your birthday. e.g. str = 02/01/1999 using find() extract and save the month, day and year as integers.

using python

set a string variable to your birthday. e.g. str = "02/01/1999" using find() extract and save the month, day and year as integers. You must be able to handle 1 and 2 digit months and days and 4 digit years print years, months and days multiply the month by .3, the day by .4 and the year by .5 and multiple them all together print the total and the total rounded to 2 decimal places

Sample Output:

2/1/2020 Month = 2

Day = 1

Year = 2020

The total is 242.39999999999998

Rounded Total is 242.40

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!