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
Can you help me with this question please ​
Flura [38]
D. half period because it is the converting of bidirectional current flow to unidirectional currency flow.
3 0
3 years ago
You use lpstat and determine that a user named User1 has placed two large print jobs in the queue for Printer1 that have yet to
ICE Princess25 [194]

A command that should be used to remove these two print jobs from the print queue is cancel Printer1-17 Printer1-21.

<h3>What is printing?</h3>

Printing can be defined as a process that typically involves sending print jobs from a computer system to a printer, especially through the print queue.

In Computer technology, "cancel Printer1-17 Printer1-21" is a command that should be used to remove the two (2) print jobs from the print queue of Printer1 which is yet to start printing.

Read more on printer here: brainly.com/question/17100575

#SPJ1

6 0
2 years ago
1. Keisha is in her first semester of college and is taking 10 credit hours: ACA 122, CIS 110, PSY 150, and developmental math.
serious [3.7K]

The advice is that she should not give up and that she should relax, and think of the time she comprehend more and then start to read. Another is to hire a private tutor to help or put her through.

<h3>What does a private tutor do?</h3>

A private tutor is known to be a person who is a specialist that has been trained in helping students known more and take in the concepts and details of any given course work.

Therefore, The advice is that she should not give up and that she should relax, and think of the time she comprehend more and then start to read. Another is to hire a private tutor to help or put her through and she will pass her exams in flying colors.

Learn more about private tutor from

brainly.com/question/6950210

#SPJ1

7 0
1 year ago
Which of the following describes the purpose of project management? planning and organizing resources to meet a goal arranging t
True [87]

Answer:

The answer to this question is given below in the explanation section.

Explanation:

The question is about selecting the option among given options that best describes the purpose of project management.

The correct option of this question is the purpose of project management is planning and organizing resources to meet a goal.

Because project management is all about planning and organizing resources of a project to meet project goals.

Other options are not correct,

because arranging the order of tasks in a project, presenting data in an organized manner, and producing a quality project- all come under project management- are parts of planning and organizing steps of project management.

4 0
2 years ago
Off topic lol but does anyone know of a free app that lets you track family and friends like their location? Thx
prohojiy [21]

Answer:Life360 has a free version and a paid

Explanation:Life360 let’s you track family by placing them in “family circles” and then allows you to track their location once they accept the invite to the circle, you May also place specific areas that it will alert them entering and exiting.

4 0
3 years ago
Read 2 more answers
Other questions:
  • What is used for World Wide Web?
    7·1 answer
  • Chunking is a good strategy for completing large assignments because it makes the work
    7·2 answers
  • The area surrounding your car that can't be seen from the driver's seat is called
    14·2 answers
  • Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 te
    13·1 answer
  • What is one reason the number of DUIs has dropped?
    7·1 answer
  • Because people can easily upload information and share online, they tend to:
    15·1 answer
  • The printer prints 16 pages every minute. How many pages are printed in 6 minutes?
    14·2 answers
  • An EULA usually takes the form of an electronic notification that appears when installing software. The user then has a choice t
    14·1 answer
  • Write a method, findMax(), that takes in two integers and returns the largest value. Ex: If the program input is: 4 2 the method
    8·1 answer
  • what is one benefit of placing voip gateways in geographically separated branch offices that have an existing wan connection?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!