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
Please conduct some research and find an article on Security Threats and please provide link of the article.
finlep [7]

Answer:

There are Security Threats happening every other day in the world. Some are minor while others can catastrophic.

Explanation:

There are also many types of <u>Security Threats</u>, <u>Breaches</u>, and <u>Hacks</u> in the world of IT. Each with their own Security Measures. Below are two links about this topic. The first link is an article about 5 of the worst corporate Security Breaches/Hacks to have taken place. While the second link is an article about the Top 10 Network Security Threats.

https://abcnews.go.com/Technology/marriotts-data-breach-large-largest-worst-corporate-hacks/story?id=59520391

https://securitytrails.com/blog/top-10-common-network-security-threats-explained

I hope this answered your question. If you have any more questions feel free to ask away at Brainly.

5 0
3 years ago
What tool is provided in Windows to facilitate sharing data objects between applications and computers?
Anton [14]

Answer:

Component services

Explanation:

In Windows, components services are integrated into the Administrative Tools and are used to configure certain COM (Component Object Model) components and applications. They are also used to ;

i. assign roles to users and groups.

ii. facilitate data sharing between applications and computers by processes such as pooling, pausing, resuming and recycling applications.

7 0
3 years ago
Without any formal planning, the president of a software company remarks in a speech that new technologically advanced software
Sphinxa [80]

Answer: The reducing project duration was caused by the emergence of new technology.

Explanation:

Emerging technologies are technologies whose development, practical applications, or both are still largely unrealized, such that they are figuratively emerging into prominence from a background of nonexistence or obscurity.

5 0
3 years ago
When a business is using methods that help it use its time and resources the best they can, what are they exercising?
maria [59]
<span>B. Efficiency

(</span><span>effective training </span><span>techniques)</span>
3 0
3 years ago
Read 2 more answers
Which of the following is an example of tangible property?
lyudmila [28]
<span>B an idea for an invention that your dad mentioned briefly but did not write down</span>
8 0
4 years ago
Other questions:
  • Given a computer running four types of instuctions, named classes A through D, calculate the execution time of a program that ha
    5·1 answer
  • How have search engines like Google, Bing, and Yahoo! revolutionized the ability to do research? They are more difficult to acce
    15·2 answers
  • GAMES Which is better Roblox or BattleCamp Basically Free Points But Please Answer
    7·2 answers
  • List of most popular entertainment and culture websites
    15·1 answer
  • Does anyone have the problem where you try to watch a video to get your answer but it brings up a thing asking your gender to ma
    6·1 answer
  • Consider the following statements: #include #include class Temporary { private: string description; double first; double second;
    9·1 answer
  • Write a program that reads raw data from a file that contains an inventory of items. The items should be sorted by name, and the
    12·1 answer
  • Anybody know this question??
    8·1 answer
  • Please help!!! I am very confused about this question!
    10·1 answer
  • Software piracy is acceptable as it helps us obtain software cheaper or sometimes even for free.
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!