Apr-19-2020, 01:43 PM
(This post was last modified: Apr-19-2020, 01:44 PM by astral_travel.)
what if i have this code:
then i get an error, so how do i replace it with some response ?
x = int(input('enter a number: ')) if x == 7: print('x equals 7') else: print('input does not equal 7')very simple right, but what if the user presses 'enter' or 7.7 or 'abc'...
then i get an error, so how do i replace it with some response ?