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
aleksandrvk [35]
3 years ago
13

Write a program that (a) generates a vector with 20 random integer elements with integers between -29 and 30, (b) replaces all t

he negative integers with 100.
Computers and Technology
1 answer:
Ghella [55]3 years ago
5 0

Answer:

import random

randomlist = []

for i in range(0,20):

n = random.randint(-29,30)

if n < 0 :

n = 100

randomlist.append(n)

print(randomlist)

Explanation:

The random module is first imported as it takes care of random. Number generation.

An empty list called randomliay is created to hold the generated random integers.

Using a for loop, we specify the range of random numbers we want.

Inside the for loop ; we attach our generated random integer which will be in the range (-29 to 30) in a variable n

For each n value generated, if the value is less than 0( it is negative, since all the values are integers), replace the value with 100.

You might be interested in
Which electronic community allows you to write a message and send it to several people at the same time?
Fynjy0 [20]
Email would be the answer youre looking for.Hope this helps!!
7 0
4 years ago
Read 2 more answers
Types of Hazards Mitigation Measures
Fynjy0 [20]

Answer:

auto mechanics

Explanation:

keeps dirt and grease off hands

4 0
3 years ago
Read 2 more answers
How does the practice of storing personal genetic data in privately owned computer databases raise issues affecting information
frozen [14]

Answer:company privacy policy change, third party access, non-effective laws, database hacking

Explanation:

Company privacy policy:company privacy policy protecting consumer information may not be strong enough, and may also change unfavourably in the future depending on certain factors.

Third party access: company may be pressurized by law enforcement/government to release genetic data for state purposes.

Non-effective laws: state laws guarding genetic information of individuals might not be broad enough as to be effective.

Database hacking: company/private database might be a victim of computer hacking.

8 0
4 years ago
What do production designers have to have extensive knowledge of when they are involved in the production of a motion picture?
defon

Answer:

The correct option is;

D. All of the above

Explanation:

The role of a production designer in film and television production involves portraying the generally perception and appearance of the narrative. The production designer is responsible for addressing the viewer perception of the location, the period in time of the narrative about the leading character, the depiction of the acts of the and experiences of the characters and the reason for their acts and experiences.

The production designer have an essential role in movie production and television programming and they work first hand with the motion picture cinematographer, director and producer.

6 0
3 years ago
A person who is good with numbers and problem solving has which type of learning preference?
ohaa [14]

Answer:

I believe it is logical.

6 0
3 years ago
Read 2 more answers
Other questions:
  • Suppose a subnet has a prefix 128.119.44.128/26. Give an example of an IP address from this subnet. If an ISP owns a block of ad
    14·2 answers
  • Data that can be used to identity a single individual is known as
    10·1 answer
  • A coworker is concerned about the veracity of a claim because the sender of an email denies sending it. The coworker wants a way
    6·1 answer
  • Students who interact online with others from different cultures should remember that
    5·2 answers
  • Explain what it means to have good file management skills.
    10·1 answer
  • Do you have to make a account of Windows 10?
    12·1 answer
  • A section in a history book describing the conditions and causes of the Great Depression in the Midwest in the 1930s. a. Enterta
    15·1 answer
  • What was the strategy the company adopted for ERP implementation?
    12·1 answer
  • What does altgr mean on a keyboard.
    10·1 answer
  • 2. Why do you think the order of operations still applies in Java? Give an example to show what could happen if you didn't use o
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!