# P-1 MCS 260 : predtemp.py due Friday 23 June 2023 at 10am
"""
We predict the temperature of tomorrow with a formula,
given the temperatures of today, yesterday, and two days ago.
The program writes once sentence, in two lines:
1. the first line confirms the input;
2. the second line contains the predicted temperature.
The formula is evaluated with floats and all numbers are
shown in fixed format, with one decimal after the dot.
"""
print('Welcome to our Temperature Predictor!')
TODAY = float(input('Enter the temperature of today : '))
YESTERDAY = float(input('Enter the temperature of yesterday : '))
TWODAYSAGO = float(input('Enter the temperature of two days ago : '))
PREDICTED = 3*TODAY - 3*YESTERDAY + TWODAYSAGO
CONFIRM = f"Given {TODAY:.1f} of today, {YESTERDAY:.1f} and {TWODAYSAGO:.1f}"
OUTPUT1 = CONFIRM + " of the two previous days,"
OUTPUT2 = f"the predicted temperature of tomorrow is {PREDICTED:.1f}."
print(OUTPUT1)
print(OUTPUT2)
