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
The Technology Librarian asks you to find out how many hops it takes to get to the first Wi-Fi kiosk. What Windows command can y
V125BC [204]

Answer:

The number of routers arrived in the path of a packet from sender to receiver are called hops. It is term used usually in computer networking.

<u>Command Used to find Hops</u>

In windows command prompt is used to find the number of hops.

1. In Command Prompt type "<em>tracert</em>" after host name and IP address of destination.

<u>Hardware devices Represented by Hop</u>

The main devices that is counted as hop in networking is <em>Router</em>. Nut Sometimes many devices such as <em>switches, repeaters and access points</em> are also count as hops. It depends on the configuration and role of the devices.

8 0
3 years ago
which of the following types of software is for organizing analyzing and storing data in a table A spreadsheet software B databa
Komok [63]

Answer:

B) Database Software

Explanation:

Desktop Publishing software and Multimedia software is not used for storing data, so it can't be that. Spreadsheet software stores data in cells, while Database software stores data in tables.

6 0
3 years ago
You work in an office that uses Linux and Windows servers. The network uses the IP protocol. You are sitting at a Windows workst
Aleksandr-060686 [28]

Answer:

PING

Explanation:

To check if there's still connectivity between the computer and server, I would use the ping command.

The ping command is primarily a TCP/IP command. What this command does is to troubleshoot shoot. It troubleshoots connection and reachability. This command also does the work of testing the name of the computer and also its IP address.

4 0
3 years ago
Most project files will contain:
Leno4ka [110]

Explanation:

not A or D,

about B and C I'm not sure

7 0
3 years ago
Computer are most wonderful creation of 21st century how ?​
son4ous [18]

Answer:

It can do all the functions at a speedy rate and also helps us to search and progress in our homes and businesses. A computer can therefore be called a calculator with a twist for not only does it perform fast calculations, but it also has other special characteristics.

Explanation:

hope it helps you

6 0
2 years ago
Other questions:
  • Never mind I got it
    8·2 answers
  • The data I collect in Google Forms are all compiled in a spreadsheet for me.<br> False <br> True
    12·2 answers
  • Can someone please help me with this question??
    12·1 answer
  • You can display content variations to mobile, tablet or desktop users.
    12·1 answer
  • The methods of the Character class that begin with ____ return a character that has been converted to the stated format.
    5·1 answer
  • An app builder wants to show groups as the last navigation menu item in the Salesforce1 mobile app. However, the app builder is
    8·1 answer
  • Many instruction sets contain the instruction NOOP, meaning no operation, which has no effect on the processor state other than
    14·1 answer
  • Primary technology skills are skills that are necessary for success in online education
    9·2 answers
  • What do mobile platforms utilize to stream voice, IP telephony, mobile internet access, video calling, gaming services, cloud co
    15·1 answer
  • Write a recursive, string-valued method, reverse, that accepts a string and returns a new string consisting of the original stri
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!