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
It is essential that a security professional is able to resolve and respond to cyber law inquiries and incidents while avoiding
Y_Kistochka [10]

Answer:

The laws and regulations will often define sensitive or protected data and the reporting requirements in the case of a data breach. Failure to follow the prescribed process can often result in fines or other penalties.

Explanation:

These data security laws should be standardized worldwide in order to stop internet abuses.

5 0
4 years ago
How can investors receive compounding returns
ANTONII [103]
If you’ve ever had a savings account, you likely know that a few cents in interest every month barely adds up. The goal is “compounding returns,” which simply means that the interest you earn each month earns additional interest, which then earns even more interest. But although a savings account will help with that, you may be lucky enough to be able to afford a cup of coffee every 10 years or so at that rate. Instead, it’s important to find a way to invest your money in a high-interest account that will earn compounding returns.

I hope this helps you out ;)
3 0
4 years ago
A web application that is designed as a single piece of software with multiple features that are fully integrated into the main
Nookie1986 [14]

Answer:

c. Service oriented architecture (SOA)

Explanation:

In a service oriented architecture (SOA), a component of an application provides services to other components of the application or other applications majorly via a communications protocol over a network. In other words, SOA is a programming or software development technique in which services communicate with each other across different platforms.  

One key principle of SOA is to design an application (which in itself is a piece of software with multiple features) that is independent of any product, service, vendor or technology but can be integrated into other applications. SOA makes use of loose coupling -  a technique in which a client service remains independent of another service that requires it.

In contrast, a monolithic architecture aims at developing a software that is self-contained, independent and not to be integrated into other applications.

On another hand, Software as a service (SaaS), though a bit similar to SOA, is a model in which an application is made available to customers basically through a network. Users basically access the application via a browser.

Therefore, the best option is

C. Service oriented architecture.

3 0
3 years ago
A drink costs 2 dollars. A taco costs 5 dollars. Given the number of each, compute total cost and assign to totalCost. Ex: 2 dri
evablogger [386]

Answer:

OKKKkkkkkkayyyy

3 0
3 years ago
Which type of backup ensures you capture a complete snapshot of everything that makes your computer run?.
Elanso [62]

Answer:

Answer is D / If not : A full image backup, or mirror backup

Explanation:

is an exact replica of everything on your computer's hard drive, from the operating system, boot information, apps, and hidden files to your preferences and settings. Imaging software not only captures individual files, but everything you need to get your system running again.

Thanks for asking this question. If my response helped, please mark as brainliest. Thank you!

5 0
3 years ago
Other questions:
  • A Use-Case diagram is a staticdiagram?
    7·1 answer
  • When i click a link the page doesn't pop up HELP THE TOMATO
    9·1 answer
  • What are the constraints for designing small and large files and how these are resolved in different file system
    7·1 answer
  • How will you -
    9·1 answer
  • What occurs when you call a method on a reference variable that contains null? Select one: a. An ArrayIndexOutOfBoundsException
    11·1 answer
  • Please I need help!!!!!!!
    14·2 answers
  • The most common Unicode transformation formats are UTF- ______ and UTF-16.
    9·1 answer
  • What is the fundamental purpose of sentiment analysis on social media?​
    9·1 answer
  • Tina has taken the time to modify font sizes and colors in a text box and would like to duplicate those settings on other text b
    12·2 answers
  • 9.3 code practice
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!