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]
2 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]2 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
An idea concerning what will happen in the future. (Crossword)
dangina [55]

Answer:

<h2>Expectation </h2>

Explanation:

Expectation is  an idea concerning what will happen in the future

7 0
3 years ago
Question 1 (True/False Worth 15 points)
liraira [26]

It is a programmer's responsibility to contribute to society and human well-being is true.

Explanation:

  • It is a programmer's responsibility to contribute to society and human well-being is true.
  • The Association for Computing Machinery (ACM) is known as  the world's largest educational and scientific computing society.
  • It has its own Code of Ethics and another set of ethical principles which were also approved by the IEEE as the known standards of teaching and practicing software engineering.
  • Programmers contribute to develop computer systems which can reduce negative impression to the society.
  • The negativity includes as threats to safety and health, which can be reduced and make everyday activities and work easier.
  • software developers should reduce the risk of harming others due to the coding errors or the security issues which could impact human well-being.

3 0
2 years ago
Consider the following code:
ICE Princess25 [194]

Answer: 3

Explanation:

Because X = 18 and our condition given to the code if > and < which do not match with the input so it prints 3.

4 0
2 years ago
Identify the causes of configuration problems. (choose all that apply)
jolli1 [7]

Answer: The computer does not meet minimum requirements of the software program because too much energy gets put in it

Explanation:

Good luck

4 0
3 years ago
Read 2 more answers
A(n) __________ is a set of technologies used for exchanging data between applications and for connecting processes with other s
Harrizon [31]

Answer:

The answer is "Option ".

Explanation:

The SOA stands for "Service-Oriented Architecture", which is primarily known as a service set and these services enable you to communicate with each other. In the communication, it may require simple data to transfer to two or more services, which can be organized by those operations, and other options were incorrect, that can be explained as follows:

  • In option a, It is a business software, which is used to organized data, that's why it is wrong.
  • Option b and Option d both are wrong because the mashup process is used only on web services, which is not a part of SOA , that's why it is wrong.
5 0
2 years ago
Read 2 more answers
Other questions:
  • You just read an msds for acetic acid. based on what you read, what type of information is included in an msds sheet? record you
    7·1 answer
  • Which is not an example of a mobile operating system?
    9·1 answer
  • What is the purpose of a turbine in a power plant?
    14·1 answer
  • A form’s height is ______________________.<br><br> A property<br><br> A method<br><br> An event
    10·1 answer
  • All systems have ___________.
    9·2 answers
  • William is an HR manager in a textile-manufacturing firm. He is creating a file on the hours each employee worked during the las
    6·2 answers
  • What is the output?
    7·1 answer
  • Tommy loves taking care of homing pigeons. He sent a note to his crush who lives 24.0 km away from his house. These birds fly at
    9·1 answer
  • I dont know how to put the negative sigh on my computer
    5·2 answers
  • Do you think that the TV set has outlived its utility as a household appliance? Research how convergence with internet technolog
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!