#WSQ05 – Temperature

In order to make this program work properly I use a str(input()) to make sure that the user only type in string and not any other character. Then the logic is simple, just by using some if and elif that validates the user choice, and an else at the end that display if the user enter an invalid character.

2016-02-18

Then I use a int (input()) just to make sure that the user type in a number and if the temperature that the user type in is higher than the boilling point of water, it will display that information and the final temperature.

2016-02-18 (1)

Remember that the if statement use a parameter as a condition defined by you, and when this is true the interpeter will run that part of the code and ignores all the code remaining. If the If statement is not true then it will pass to an elif statement when you can write another condition, at the end an else statement is used as the default option if not of the above is true. (if x<y:) and do not forget to ident well

#TC101

CC BY-SA 4.0 #WSQ05 – Temperature by programmingtc101 is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.