title: Python3 except ValueError: if/else
body: <p>I want to make a try/except to ensure that the inputted value is a float variable. However i want to make an exception if the inputted value is 'g' then i want to redefine the variable to '9.8' instead of telling me that it must be a number. Below is my try but there seems to be a problem with it.
  PS ignore my mistake of printing "must be an integer"</p>
  
  <p><a href="https://i.stack.imgur.com/D0y2w.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/D0y2w.png" alt="enter image description here"></a></p>