Alan Gauld [mailto:alan.ga...@yahoo.co.uk]
Sent: Tuesday, June 13, 2017 1:36 AM
To: tutor@python.org
Subject: Re: [Tutor] Fahrenheit to Celsius Conversion with if else statements
On 12/06/17 15:17, William Gan wrote:
> print('Enter C for Celsius to Fahrenheit or F for Fahrenheit to
> Ce
On 12/06/17 15:17, William Gan wrote:
> print('Enter C for Celsius to Fahrenheit or F for Fahrenheit to Celsius.')
> unit = input('Enter C or F:')
> temp = int(input('Enter temperature:'))
>
> if unit == 'C':
Note this only t5ests for 'C' - ie capital C.
You might want to force the input to be u
Good day Everybody,
I am practicing coding when I encountered a problem with the if and else
statements in my code. Hope someone can help me understand my mistake.
The following is my code to convert Fahrenheit to Celsius and vice-versa:
print('Enter C for Celsius to Fahrenheit or F for Fahrenh