repl.it
@jonathanbell/

Learning some python

Python

No description

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import sys

x = input('Enter a number: ')

if not x.isnumeric():
  print ('That is not an integer. Please give an integer.')
  sys.exit()

if int(x) > 10:
  print ('Greater than 10!')
elif int(x) > 5:
  print ('Greater than 5!')
elif int(x) > 1:
  print ('Greater than 1!')
else:
  print ('Must be zero or negative...')

?