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
Importing data is sending data to a new file.Is this true or false
Kipish [7]

false homie I gotcho


3 0
3 years ago
Read 2 more answers
Consider the helicopter of Example 2.1, but with a slightly different definition of the input and output. Suppose that, as in th
anzhelika [568]

Answer:

Solution: In this case, the system can be modeled as a function with two output signals,

S: (R  --> R) --> (R --> R)^{2}

where

(S(T_{y}))(t) = (x(t), y(t))

where(x(t), y(t)) is the position of the tail in they plane. This model Is Clearly not linear. If the  Input torque doubles, for example, the output values will not double. In fact, the output values are constrained to lie on a circle centered at the origin, regardless of the Input. For this reason, the model is BIBO stable. The output is always bounded. Thus, while our previous model was linear and unstable, this one Is nonlinear and stable. Which model is more useful?

3 0
3 years ago
Recording relative positions should reduce total programming time true or false
Svet_ta [14]

This is true. Recording relative positions in most cases will reduce total programming time and make it over all more efficient.

4 0
3 years ago
What are two distinctive types of unmanned aircraft systems
chubhunter [2.5K]
Probes and Drones
Hope this helps and please give brainliest!
8 0
3 years ago
When 2 or more computers are connected it is called?
Alenkasestr [34]

When two or more computers are connected it is called Local Area Network (LAN).

5 0
3 years ago
Other questions:
  • WILL MARK BRAILIEST IF ANSWERED FAST!!!
    8·1 answer
  • Please answer fast screenshot included - thanks in advance
    11·1 answer
  • A(n) monitoring vulnerability scanner is one that listens in on the network and determines vulnerable versions of both server an
    7·1 answer
  • When cleaning a computer, you need only worry about what you can see.
    11·1 answer
  • A 'array palindrome' is an array which, when its elements are reversed, remains the same (i.e., the elements of the array are sa
    6·1 answer
  • What is emerging as a major business area of innovation that offers a flexible collection of computers on the internet that can
    6·1 answer
  • Write down the characterizations that best suits the term Java applets?
    7·1 answer
  • Add me on Fortnite. Epic is smashman892. *Ik it sux but it's an old account* Comment ur epic
    6·2 answers
  • Which term best describes these lines?
    7·1 answer
  • What problems do you see in the process of transacting business online
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!