1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Anika [276]
3 years ago
12

Write a program that will generate 100 integers between 0 and 1000. Store the even numbers in a sorted linked list called evens.

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. Use the Linked_List class we developed in class.
Computers and Technology
1 answer:
Tomtit [17]3 years ago
8 0

Answer:

see explaination

Explanation:

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)

You might be interested in
PLZZZZZZZZ HURRY What is FireWire?
ycow [4]

Answer:C

Explanation:

7 0
4 years ago
Read 2 more answers
When should you use an array in developing a program? Explain why it is important to apply arrays in a program.
agasfer [191]

Answer:

The answer is below

Explanation:

There are various reasons to apply arrays in a program. Some of which includes:

1. Arrays provides users to easily save specified numbers of the element in them.

2. It easily store data of similar types and sizes.

3. It allows users to store data in various dimensional arrays.

4. It eliminates deficit of memories for the location of its elements

5 0
3 years ago
Example of AI in online shopping<br>​
Doss [256]

Answer:

hope it's help you ok have a good day

8 0
3 years ago
Suppose an initially-empty queue Q has performed a total of 32 enqueue operations, 10 front operations, and 15 dequeue operation
Natasha_Volkova [10]

Answer:

22

Explanation:

1. We are going to have at hand 32 Enqueue Operation, with 10 from front and 15 dequeue and 5 empty queue operation

2. You dequeued total number of 15-5 =10 elements since 5 dequeue did not change the state of the queue, so invariably 10 dequeue is done.

3. Next is to enqueued a total of 32 elements.

Enqueue Operation do not change the state(and Size) of the queue, and can be ignored.

4. To arrive at the Total Size of queue, we will have 32-10 = 22 at the end

Answer : 22 because its a 5 dequeue Operations.

6 0
3 years ago
A personal academic plan is a set of goals relating to the things you want to accomplish while you are in school.
Alex787 [66]

Answer:

True

Explanation:

8 0
2 years ago
Other questions:
  • Which of the following would be considered a strong password?
    5·2 answers
  • A job application is a form used to make a job request.<br> True<br> False
    8·2 answers
  • In windows, a hamburger is an icon that, when clicked, displays a(n) _____________.
    15·1 answer
  • The best defenses against covert channels include IDS and intrusion prevention system (IPS) and thoroughly watching all aspects
    15·1 answer
  • The function of the __________ is to on transmission assemble data into a frame, on reception disassemble frame and perform addr
    8·1 answer
  • Which of the following is a public location that sells Internet access? Internet café Extranet Intranet LogMeIn,
    15·1 answer
  • You recently started working part-time in a retail store, and are learning about the reading devices your store uses.Your store
    9·1 answer
  • 5. Compare the telephone network and the internet. What are the similarities? What are the differences?
    12·1 answer
  • What is the output by the code system.out.print(8-4+2);
    13·1 answer
  • Glenda is searching airline schedules on HolApp, a mobile Web application. While browsing the application, a banner appears on t
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!