If Statements

© QuantSprout

Simple If Statement

In [22]:
 

Else If Statement

In [22]:
 

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.

In [ ]:
 

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

In [ ]: