# file: inClassAssignment2.py
# This program generates a list of n numeric values from the interval [-100,100].
# The number n is provided by the user, for the number generation
# pseudo-random function randint is used.
# Then the values are sorted and printed out
from random import randint
def main():
flag = 0
try:
n = int(input("Please, enter how many numbers you would like to have in a list:"))
except:
print("Incorrect input. Terminating the program...")
flag = 1
if flag == 0:
L=[]
for i in range(n):
L.append(randint(-100,100))
print("This is the list we created so far:",L)
L.sort()
print("This is the sorted list of values:",L)
main()