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
Andrews [41]
3 years ago
13

True or False: Nested elements must be indented with respect to parent elements in

Computers and Technology
1 answer:
Dovator [93]3 years ago
7 0

Answer:

true

Explanation:

You might be interested in
Emma won a laptop at her high school science fair. The laptop does not have antivirus software installed on it so Emma must purc
patriot [66]

if the question is if she should..

Explanation:

Yes, she should if she plans to  use it for a couple years she should get the best anti virus software :)

3 0
3 years ago
A file named numbers.txt contains an unknown number of lines, each consisting of a single positive integer. Write some code that
Reptile [31]

Answer:

  1. with(open("numbers.txt")) as file:
  2.    data = file.readlines()  
  3.    runsum = 0
  4.    largest = 0
  5.    
  6.    for x in data:
  7.        if(int(x) > largest):
  8.            largest = int(x)
  9.            runsum += largest  
  10.    
  11.    print(runsum)

Explanation:

The solution code is written in Python 3.

Firstly, open a filestream for numbers.txt (Line 1) and then use readlines method to get every row of data from the text files (Line 2).

Create a variable runsum to hold the running sum of number bigger than the maximum value read up to that iteration in a for loop (Line 3).

Use a for loop to traverse through the read data and then check if the current row of integer is bigger than the maximum value up to that point, set the current integer to largest variable and then add the largest to runsum (Line 6 - 9).

At last display the runsum to console terminal (Line 11).

8 0
4 years ago
#include using namespace std; int main( ) { const int NUM_ROWS = 2; const int NUM_COLS = 2; int milesTracker[NUM_ROWS][NUM_COLS]
VARVARA [1.3K]

Answer:

#include <iostream>

using namespace std;

int main()

{

   const int NUM_ROWS = 2;

   const int NUM_COLS = 2;

   int milesTracker[NUM_ROWS][NUM_COLS];

   int i = 0;

   int j = 0;

   int maxMiles = -99; // Assign with first element in milesTracker before loop

   int minMiles = -99; // Assign with first element in milesTracker before loop

   milesTracker[0][0] = -10;

   milesTracker[0][1] = 20;

   milesTracker[1][0] = 30;

   milesTracker[1][1] = 40;

   

   maxMiles = milesTracker[0][0];

   minMiles = milesTracker[0][0];

   

   for (i = 0; i < NUM_ROWS; i++){

       for (j = 0; j < NUM_COLS; j++){

           if (milesTracker[i][j] > maxMiles){

               maxMiles = milesTracker[i][j];

           }

           if (milesTracker[i][j] < minMiles){

               minMiles = milesTracker[i][j];

           }

       }

   }

   

   cout << "Min: " << minMiles << endl;

   cout << "Max: " << maxMiles << endl;

   return 0;

}

Explanation:

It seems you want to find the min and max value in the array. Let me go through what I added to your code.

Set the maxMiles and minMiles as the first element in milesTracker

Create a nested for loop that iterates through the milesTracker. Inside the loop, check if an element is greater than maxMiles, set it as maxMiles. If an element is smaller than minMiles, set it as minMiles.

When the loop is done, print the minMiles and maxMiles

5 0
3 years ago
How can a scientist safely tell whether an unknown solution is salt in water or sugar in water?
kaheart [24]

Answer:

the answer is C

7 0
4 years ago
Can anybody give me any suggestions to what my pfp should be
Julli [10]

Answer:

— Your profile picture can be one of the most important elements of ... but your photo should give candidates a clear idea of what you'd ... They might also help to direct you a bit, like telling you to tilt your head slightly or tuck your ...

Explanation:

6 0
3 years ago
Read 2 more answers
Other questions:
  • A cpu with an external clock speed of 2 ghz and a 64-bit data bus can (theoretically) transfer how much data per second?
    8·1 answer
  • How to use javascript libraries in javascript code?
    9·1 answer
  • Which computer device is used to capture or copy a photograph to place in a report?
    14·1 answer
  • 1. What are the built-in operations on classes?
    8·1 answer
  • Which of the following is not one of the four methods for classifying the various instances of malware by using the primary trai
    9·1 answer
  • Please help! would appreciate it very much!
    13·1 answer
  • Within a major students can choose to study a specific area within major. For example a journalism student may study military jo
    8·1 answer
  • In the context of intentional security threats, _____ can erase data and wreak havoc on computers and networks but do not replic
    12·1 answer
  • A(n) _____ is used to create a new file or to overwrite an existing file by attaching it to a command that produces output.
    10·1 answer
  • . Consider the problem of finding the largest element in a list of n elements. What will be the basic operation of an algorithm
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!