Answer:
import random
def num_gen(s, e, n):
r = ()
for j in range(n):
r.append(random.randint(s, e))
return r
n = 100
s = 0
e = 1000
l = num_gen(s, e, n)
even_list = []
odd_list = []
for i in l:
if i % 2 == 0:
even_list.append(i)
else:
odd_list.append(i)
print("Even List:", even_list)
print("Odd List:", odd_list)
Step-by-step explanation:
This program takes in integers as its input.
These integers are generated 100 integers between 0 and 1000.
The program made use of a linked_list class to Store the odd numbers in a different sorted linked list called odds. Print the content of the evens and odds linked lists to the screen.
The generated output will be gotten from the program