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
ANEK [815]
3 years ago
14

g Write a general-purpose program with a loop and indexed addressing that calculates sum of the values of elements of a DWORD ar

ray that are located at multiple of 4 location. For example for the array 1,2,3,4,5,6,7,8,9,10,11,12,13,14
Computers and Technology
1 answer:
Vikki [24]3 years ago
7 0

Answer:

def sumD4th(dword):

   select = dword[3::4]

   print(sum(select))

mylist = [1,2,3,4,5,6,7,8,9,10,11,12,13,14]

sumD4th(mylist)

Explanation:

The python program above defines a function called "sumD4th" that accepts a list as its argument. The variable "select" is created which is the subset of the list argument "mylist" containing the index items that is a sum of four. The output of the function is the sum of the items in the "select" list.

You might be interested in
When should students practice netiquette in an online course? Check all that apply.
Elden [556K]

Answer:

tienesrazon  

Explanation:

6 0
3 years ago
________ are typically comprised of a mix of ________ and ________.
zaharov [31]
Your answer is "Mutual funds; stocks; bonds".
8 0
4 years ago
Read 2 more answers
What are the 3 symbols that can’t be used when saving a document? (From Microsoft Word 2016) (pls helped me!)
Charra [1.4K]

Answer:

\, /, -

Explanation:

The three symbols are forward slash, backward slash, and the hyphen. These were allowed in previous versions of the MS Word. However, since the MS Word 2016 and a little earlier, these three symbols have been banned. And you will immediately get a message if you use these, to correct, and only then the file will be saved with that new name, and that must not have the forward or backward slash or the hyphen.

6 0
4 years ago
Your friend is an intern at the local Department of Health and needs to prepare a report about the recent activity of the influe
Butoxors [25]

Answer:

#include<bits/stdc++.h>

using namespace std;

int main(){

  // Defining Variables

  int no_of_weeks;

  int total_cases = 0;

  //Declaring Vector of Pair of Integer and string

  std::vector<pair<int,string>> data;

  // Taking Input for the Number of Weeks

  cout<<"Enter No. of Weeks\n";

  cin >> no_of_weeks;

  // Running the Loop for no_of_weeks times

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

      int A,B,C;

      // Taking Input for different types of flus

      cout<<"Enter No. of Cases of Flu A, B, C for week" << i + 1 << " seperated by space : \n";

      cin >> A >> B >>C;

      // Adding all the cases in a week

      int cases_in_a_week = A + B + C;

      // Updating total cases

      total_cases += cases_in_a_week;

      // Declaring the level variable

      string level;

      // Updating the level of the week corresponding to each case

      if(cases_in_a_week < 500) level = "Low";

      else if(cases_in_a_week >= 500 && cases_in_a_week < 2000) level = "Moderate";

      else level = "Widespread";

      // Storing the Week's information by using a vector of pairs

      // in which pair's first is the number of cases which is of type int

      // while the second is the level of the flu which is of the type string

      data.push_back(make_pair(cases_in_a_week,level));

  }

  // Linking the stdoutput to the flu_report.txt file

  // this also creates the file with the same name if it doesn't exists

  freopen("flu_report.txt", "w", stdout);

  // Printing the respective output data with Bar Chart of stars for each level

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

      //printing the week no. and number of cases

      cout<<i+1<<" "<<data[i].first<<" "<<data[i].second<<" |";

      //calculating the number of stars

      int stars = data[i].first/250;

      //printing the stars of the bar chart

      for(int j = 0; j < stars ; j++) cout<<"*";

      cout<<endl;

  }

  //printing the total number of cases

  cout<<total_cases;

}

Explanation:

3 0
3 years ago
Read 2 more answers
An animation is made up of individual images called _______________.
inysia [295]

Answer:

D. Frames

Explanation:

An animation is made up of individual images called FRAMES.

The term refers to old film ribbons where each image was presented in a frame, on the long film ribbon that would be moving in front of a light to project the movie images.

A. Thumbnails: they're a small version of an image.

B. Hot spots are areas that can be clicked to link somewhere else for example.

C. Icons are small images, can be animated or not.

5 0
4 years ago
Other questions:
  • While there are many types of sediments, those that make up sedimentary rocks must be transported by running water.
    9·1 answer
  • Write the definition of the word "log" as it would be used in relation to digital literacy
    13·1 answer
  • What types of issues can you most likely resolve by knowing how to access and use the control panel choose all that apply?
    10·1 answer
  • Write a program that prompts the user for an integer and then prints all prime numbers up to that integer.
    7·1 answer
  • MARKETING HELP PLEASE?!?!?
    15·1 answer
  • In a system where Round Robin is used for CPU scheduling, the following is TRUE when a process cannot finish its computation dur
    13·1 answer
  • Which factor helps drive globalization?
    9·1 answer
  • What construction work is the tender for​
    10·2 answers
  • In your own view, how can social media be used in teaching and learning in higher education?
    10·1 answer
  • You have purchased a new LED monitor for your computer. On the back of the monitor, you see the following port (pictured below).
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!