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
Who like the videos where is clown is from :)
aev [14]

Answer:

i hate clowns alot especially pennywise lol

Explanation:

5 0
3 years ago
Which internet explorer security feature restricts the browsing session information that can be tracked by external third-party
Anarel [89]

Tracking protection internet explorer security feature restricts the browsing session information that can be tracked by external third-party websites and applications

The internet can be a dangerous place, and it's important to take steps to protect your privacy. One way to do this is to enable tracking protection in your web browser.

Tracking protection is a security feature that restricts the information that can be tracked by external websites and applications. This means that your browsing session will be more private, and your data will be less likely to be collected and used without your consent.

To enable tracking protection in Internet Explorer, go to the Tools menu and select Internet Options. On the Privacy tab, click the Tracking Protection button. You can then choose to enable tracking protection for all websites, or only for certain websites that you trust.

Enabling tracking protection can help to keep your data safe and your privacy protected. So if you're concerned about online privacy, be sure to enable this feature in your web browser.

Learn more on internet explorer here:

brainly.com/question/28431103

#SPJ4

6 0
1 year ago
Enter a character: * ASCII #42 Enter a character: exit Not a character
Dima020 [189]

* ‎‎‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎

8 0
3 years ago
An administrator has just added a new update to the WSUS server and she wants to test the update to the test group. Which of the
DENIUS [597]

Answer:

a. gpupdate /force

Explanation:

Based on the information provided within the question it can be said that if the administrator does not want to wait she can use the command gpupdate /force. This command allows the individual to update both the local Group Policy settings and Active Directory-based settings. This the force tag makes it so that the policy is immediately update.

6 0
3 years ago
Mark for review (Will be highlighted on the review page) 3. Which one of the following word processing features saves you the mo
Maksim231197 [3]
B- find and replace can replace any word in the document with another.

7 0
3 years ago
Other questions:
  • HELP ASAP!!!!!!!!! ITS A UNIT TEST: WILL MARK AS BRAINLIEST&gt;
    13·1 answer
  • What type of devices are the key board and the mouse?
    10·1 answer
  • Questions 1 )When does a spring tide take place?
    14·2 answers
  • Which button, when pressed, allows light from the subject to fall on the sensor?
    8·1 answer
  • I WILL GIVE BRAINLIEST TO WHO ANSWERS FIRST AND CORRECTLY.
    9·1 answer
  • Which of the following statements are true about quick sort
    12·1 answer
  • Which of these programmers creates the core game engine?
    5·2 answers
  • This is the term for the manual process of editing strips of the film before digital editing was created. The term is still used
    9·1 answer
  • 2
    6·1 answer
  • Your company is building a new architecture to support its data-centric business focus. You are responsible for setting up the n
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!