If Statements

© QuantSprout

Simple If Statement

 

Else If Statement

 

Exercise: Update your function to handle errors and convert Fahrenheit to Celsius

1. Create a function that checks the type of an input and returns True if the input is numeric (float or integer) or a False if it is another data type.

 

2. Update your temperature function from the Python Fundamentals exercise to return an error message if a string is entered instead of a number.