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
Setler79 [48]
3 years ago
12

Define a function below, sum_numeric_vals, which takes a single dictionary as a parameter. The dictionary has only strings for k

eys, but can have string or integer values. Complete the function to calculate and return the sum of the integer values in the dictionary.
Computers and Technology
1 answer:
notka56 [123]3 years ago
3 0

Answer:

Following are the program in the Python Programming language.

#define function

def sum_numeric_vals(dic):

 #set and initialize the integer variable to 0

 sum_total = 0

 #set the for loop to extract the value of dictionary

 for val in dic.values():

   #set if condition to find the sum

   if type(val)==int:

     sum_total += val

 #return the sum of the values

 return sum_total

#set and initialize dictionary type variable

dic={"Two":2,"Four":4}

#call and print the function

print(sum_numeric_vals(dic))

<u>Output:</u>

6

Explanation:

Here, we define the function "sum_numeric_vals()" and pass an argument "dic", inside the function.

  • Set and initialize an integer data type variable "sum_total" to 0.
  • Set the for loop which extract the values of the dictionary.
  • Set the if conditional statement inside the loop to find the sum of the values of the dictionary.
  • Then, return the sum of the values of the dictionary.

Finally, we set and initialize the dictionary type variable "dic" and pass it in the function's argument list then, call the function through the print function

You might be interested in
____________ refers to the computer-to-computer transmission of business data in a structured format.
motikmotik

Answer:

Electronic Data Interchange (EDI)

Explanation:

Electronic Data Interchange

It is the automated interchange of commercial information using a structured format. A process that allows a company to send information to another company electronically rather than on paper. Commercial entities that conduct business electronically are called business partners.

Numerous commercial documents can be exchanged using electronic data interchange, but the two most common are purchase orders and invoices. At a bottom, EDI interchanges the preparation and handling of mail associated with traditional commercial communication. However, the true power of EDI is that it standardizes the information communicated in commercial documents, which makes a "paperless" exchange possible.

6 0
3 years ago
A search engine displays a list of webpage names that contain the search text. what is the term for that list?
Minchanka [31]
<span>A search engine displays a list of webpage names that contain the search text. The term for that list is hit.
Basically, what this term refers to is the number of visits, or a number of downloads that happened on that particular webpage. It is a good tool to measure web traffic, or how much that page is visited.
</span>
6 0
3 years ago
A picture drawn in 3 d is called?​
Varvara68 [4.7K]

Answer:

autostereogram

Explanation:

that^

6 0
3 years ago
Read 2 more answers
Choices.
Svet_ta [14]

Answer:

1. B

2. D

3. C

4. A

5. B

Explanation:

1. To check the integrity of your hard disk and fix various file system errors, the Windows utility which should be implemented is Check disk (Chkdsk). This utility is always used with the command line interface (CLI) with the command "chkdsk."

2. An event or action took place and it caused damage to data, hardware, software and processing capability of the computer. From the statement given, security risks are being described. Any event or action that is capable of causing a problem to a computer system is considered to be a security risk and should be prevented through the use of an appropriate utility software.

3. Virus is a software program that can infect, damage and disrupts the whole computer system.

4. To protect the whole computer system, the software utility which is needed is an Anti-virus.

5. To avoid losing valuable data to your computer, the most important thing to do is to regularly back-up your files.

7 0
2 years ago
How to insert header and page number in word 2016?
AleksAgata [21]
Insert - Header - choose header of your choice. Page numbers are below the Header icon

3 0
3 years ago
Other questions:
  • Given the function definition
    12·1 answer
  • A cybersecurity analyst is currently investigating a server outage. The analyst has discovered the following value was entered f
    9·1 answer
  • A ____________ would be a misconfiguration of a system that allows the hacker to gain unauthorized access, whereas a____________
    12·1 answer
  • What are candid shots? what are posed shots?
    13·1 answer
  • Blender is used by which video game team member?
    15·1 answer
  • If we assume the modern view of existential import, why is the following syllogism invalid? No computer is made of clay. All com
    15·1 answer
  • Write if true or false
    12·1 answer
  • What do macOS and Windows use to prevent us from accidentally deleting files?
    15·1 answer
  • Which of the following is NOT a possible combination of values of the variables in this program when it finishes running?
    6·2 answers
  • One word for The characters typed by a user using a<br> keyboard.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!