Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # March
- # February
- # April
- expected_blossom_date = input().split()
- average_temp_pred = int(input())
- rain = int(input())
- winter_length = int(input())
- for i in range(len(expected_blossom_date)):
- if expected_blossom_date[0]:
- day = expected_blossom_date[0]
- if expected_blossom_date[1]:
- full_month_name = expected_blossom_date[1]
- if expected_blossom_date[2]:
- year = expected_blossom_date[2]
- day = int(day)
- full_month_name = str(full_month_name)
- year = int(year)
- if year % 4 == 0:
- average_temp_pred += 5
- if full_month_name == 'March' or full_month_name == 'April' or full_month_name == 'February':
- winter_length /= 7
- day += winter_length
- if average_temp_pred > 20:
- remaining_degrees = average_temp_pred - 20
- day -= remaining_degrees
- elif average_temp_pred < 20:
- remaining_degrees = 20 - average_temp_pred
- day += remaining_degrees
- if rain > 30 or rain < 30 and rain % 3 == 0:
- remaining_cm = abs(rain - 30)
- while remaining_cm > 0 and remaining_cm % 3 == 0:
- remaining_cm /= 3
- day += 1
- if day < 0 and year % 4 == 0:
- day *= -1
- day = 29 - day
- full_month_name = 'February'
- elif day < 0:
- day *= -1
- day = 28 - day
- full_month_name = 'February'
- print(f"{day:.0f} {full_month_name} {year}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement