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
A form of brainstorming that serves as a visual aid to thinking laterally, helps explore a problem (usually by stating the probl
ELEN [110]

Answer:

The answer is BRAINSTORMING

Explanation:

<em>A visual aid to thinking laterally and exploring a problem, usually by stating the problem in the center  of the page and radiating outward spokes for components of the problem. Each component can then be considered separately with its own spokes, so that each point , thought, or comment is recorded.</em>

7 0
3 years ago
Tab stops are useful when you want to?
Lelu [443]
Indentation and alignment are very noticeable on a printed page, so you will probably want to set the tab stops in your document precisely how you want them.


8 0
3 years ago
Which type of bank account typically offers no iterest?
SCORPION-xisa [38]
Money market?? i think anyway.
8 0
2 years ago
Read 2 more answers
Flujograma de nómina ​
balu736 [363]
Explanation there is the rest in comments

7 0
2 years ago
You are running an 802.11g wireless router in mixed mode. You have three 802.11g wireless NICs connected to the router. A new us
notka56 [123]

Complete Question:

You are running an 802.11g wireless router in mixed mode. You have three 802.11g wireless NICs using the router. A new user connects using an 802.11b wireless NIC. What will happen?

Group of answer choices.

A. The user with 802.11b will access the network at 11Mbps while the users with 802.11g will access the network at 54 Mbps.

B. The user with 802.11b will not be able to communicate on the network.

C. The user with 802.11b will access the network at 11 Mbps. The users with 802.11g will access the network at 54 Mbps unless they are communicating with the 802.11b device,which will be at 11 Mbps.

D. All users will access the network at 11 Mbps.

Answer:

D. All users will access the network at 11 Mbps.

Explanation:

A 802.11g is one of the wireless network standards developed by the Institute of Electrical and Electronics Engineers (IEEE) which operates on a 2.4 GHz microwave bandwidth and as a result can only transmit over a short distance. The 802.11g has a data transfer rate or throughput of 54 megabits per seconds (Mbps).

Basically, the 802.11b is a similar standard to the 802.11g wireless standard that typically allows the transmission (transfer) of data for up to 11 megabits per seconds (Mbps).

In this scenario, you are running an 802.11g wireless router in mixed mode. You have three 802.11g wireless NICs using the router. A new user connects using an 802.11b wireless NIC.

Hence, what will happen is that, all the users will access the network at 11 Mbps.

6 0
2 years ago
Other questions:
  • Consider the following recursive method, which is intended to return a String with any consecutive duplicate characters removed.
    11·1 answer
  • Developers work together with customers and useras to define requirements and specify what the proposed system will do. If once
    9·1 answer
  • Choose the two main capabilities involved in visual literacy
    13·1 answer
  • Write the method makeNames that creates and returns a String array of new names based on the method’s two parameter arrays, arra
    9·1 answer
  • What cannot be performed using windows task manager
    10·1 answer
  • In Microsoft word you can access the blank command from the mini toolbar
    7·1 answer
  • In a system with paging as the address translation mechanism, using multi-level paging always causes less memory usage for stori
    9·1 answer
  • Just took a test and I got 5 wrong and I wanted to know the correct answers
    10·1 answer
  • What is the correct name for the words Home, Insert, Design, Layout, References, etc. in the ribbon in Word 2016?
    7·1 answer
  • Angular where to set httpclient root url.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!