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
Joe has just started the Security Module. He wants to get through it as quickly as possible and take the Quiz. As he clicks thro
Scorpion4ik [409]

Answer:

Joe should read the explanatory text and complete the learning activities.

Explanation:

Given

See attachment for options

Required

Best strategy to get through the module

First off, rushing through the activities and taking guess for each question (as suggested by (a)) will not help him;

He may complete the activities but sure, he won't learn from the module.

Also, reading through the units without completing the activities is not an appropriate method because Joe will not be able to test his knowledge at the end of the module.

The best strategy to employ is to read through the units and complete the activities, afterwards (option (b)).

4 0
3 years ago
Write a calculator program that will allow only addition, subtraction, multiplication & division. Have the
ozzi

num1 = float(input("Enter the first number: "))

num2 = float(input("Enter the second number: "))

operation = input("Which operation are you performing? (a/s/m/d) ")

if operation == "a":

   print("{} + {} = {}".format(num1, num2, num1+num2))

elif operation == "s":

   print("{} - {} = {}".format(num1, num2, num1-num2))

elif operation == "m":

   print("{} * {} = {}".format(num1, num2, num1*num2))

elif operation == "d":

   print("{} / {} = {}".format(num1, num2, num1/num2))

I hope this helps!

8 0
2 years ago
What does it mena when they say "all germs are germs"
KiRa [710]

Answer:it means that germs are germs germs are reproductive they split apart from one another to create more germs.

Explanation:

7 0
3 years ago
Which of the following statements are TRUE about credit cards? I. When you use a credit card, the money comes directly out of yo
Svetllana [295]

i think it is 1. becuase it can be.

4 0
3 years ago
What are the three most popular form factors used for motherboards?
Darina [25.2K]
ATX
microATX (smaller version of ATX)
mini-ITX (smaller version of microATX)

5 0
3 years ago
Read 2 more answers
Other questions:
  • For Adults/Adolescents, you should call/activate EMS: Before providing CPR. After providing CPR for 2 minutes. After an AED has
    13·1 answer
  • Create a Python for loop script of exactly 2 lines of code that generates a sequence of integer numbers that start in zero and g
    12·1 answer
  • Write a Python program that will take as input 5 integer values and will output the average of the odd values and the average of
    6·1 answer
  • The word count of the active document is typically displayed on the ________.
    15·1 answer
  • A(n) _______________ is a collection of configuration and security settings that an administrator has created in order to apply
    14·1 answer
  • Compare and contrast system software and generalised software
    11·1 answer
  • Hoda is creating a report in Access using the Report Wizard. Which option is not available for adding fields using the wizard?
    15·2 answers
  • Nicotine us a dangerous chemical found in Cigarettes; it is accompanied by two other very harmful chemicals. These are
    15·1 answer
  • 3
    7·2 answers
  • The ________ is the biggest power consumer on a mobile computing device. display CPU memory module hard drive
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!