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
IgorC [24]
2 years ago
13

In python, sorry if it’s blurry

Computers and Technology
2 answers:
BigorU [14]2 years ago
4 0

lst = [[6,-3,8,0,5,-1,2,-2],[-7,4,3,-5,8,9,1,6]]

neg_values = 0

for x in lst:

   for y in x:

       if y<0:

           neg_values += 1

print(neg_values)

I wrote my code in python 3.8. I hope this helps

stepan [7]2 years ago
3 0

Answer:

nice

Explanation:

You might be interested in
How do you run a function in python?
Black_prince [1.1K]
You can call a Python function like so: function(parameters).

Example:

Define function add:
def add(x,y):
return x+y

Call function:
add(3,7) -> 10
3 0
3 years ago
How do you create a logo on Adobe illustrator
artcher [175]
Idk idk idk idk if dub
7 0
3 years ago
Which slide elements must claire use to enhance her presentation?
Crank

The answer for the 1st blank is text.


6 0
3 years ago
Read 2 more answers
The ArrayList class contains a trim method that resizes the internal array to exactly the capacity. The trim method is intended
andreev551 [17]

Answer:

public void trimToSize() {

modCount++;

if (size < elementData.length) {

elementData = (size == 0)

? EMPTY_ELEMENTDATA

: Arrays.copyOf(elementData, size);

}

}

Now, the running time for copyOf() function is O(N) where N is the size/capacity of the ArrayList. Hence, the time complexity of trimToSize() function is O(N).

Hence, the running time of building an N-item ArrayList is O(N^2).

Please find the sample code below.

CODE

==================

import java.util.ArrayList;

public class Driver {

  public static void main(String[] args) throws Exception{

      int N = 100000;

      ArrayList<Integer> arr = new ArrayList<>(N);

     

      long startTime = System.currentTimeMillis();

      for(int i=0; i<N; i++) {

          arr.add(i);

          arr.trimToSize();

      }

      long endTime = System.currentTimeMillis();

      double time = (endTime - startTime)/1000;

      System.out.println("Total time taken = " + time + " seconds.");

  }

}

Explanation:

5 0
3 years ago
Why is it important to follow a consistent naming convention for variables?
Vitek1552 [10]

Answer:

today I am going to be out for the job interview so if I will make it happen I am going to New Orleans this week to get the kids to work on the spot and I can get ready to go out to dinner and I can make a few more people

4 0
2 years ago
Other questions:
  • To keep your emails concise and to the point
    13·1 answer
  • When you use the bufferedreader class, you must import the ____ package into your program?
    14·1 answer
  • Book checkout scenario at a library: The Worker tells the System the identity of a patron who wishes to check out books. The Sys
    8·1 answer
  • What are some ways tables can be inserted into a document? Check all that apply.
    5·2 answers
  • You are part of a team that is setting up a movie streaming service. The company is planning on initially making available 500 m
    8·1 answer
  • Enables businesses and consumers to share data or use software applications directly from a remote server over the Internet or w
    6·1 answer
  • You are managing an FTP server installed in Ubuntu Server. The server has created a very large log le, vsftpd.log. Which command
    14·1 answer
  • The hottest part of the Earth is the
    9·2 answers
  • Which of the following is not a benefit of shaping data with the Power Query Editor?
    13·1 answer
  • Why do you want to work from our company?​
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!