Hint: Use https://pypi.org/project/ipython/
You have to indent explicit by 4 spaces after the
You don't have to hit 4 times the space, if you use IPython. Also Tabulator is converted into 4 spaces :-)
You have to indent explicit by 4 spaces after the
try
and the except
:>>> try: ... a = float(input('Enter a number: ')) ... except ValueError: ... print('You entered an invalid number') ... Enter a number: 3/4 You entered an invalid number >>>Same with IPython repl:
In [1]: try: ...: a = float(input('Enter a number: ')) ...: except ValueError: ...: print('You entered an invalid number') ...: Enter a number: 3/4 You entered an invalid number In [2]:The benefit here is, that the indentation for multiline is made automatically.
You don't have to hit 4 times the space, if you use IPython. Also Tabulator is converted into 4 spaces :-)
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
All humans together. We don't need politicians!