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
1. A truck leaves a stop sign and accelerates uniformly over a time of 5.21 seconds for a
Rufina [12.5K]

Answer:

1, is 21.11 meters per second.

110/5.21

Explanation:

3 0
3 years ago
Owners of individual domains get to decide what content is published on their websites. Why might this autonomy be important to
Alika [10]

Answer:

Explanation:

With an individual domain name we can upload all the content we want, in a free domain or share domain, upload content in some cases have a limit, for example the size of an image, in an individual domain we can add our brand, in a shared, we can add our brand side to company share those domains, we can have our own email address, practically we have a complete autonomy in our website.

4 0
3 years ago
Your organization has hired a penetration tester to validate the security of your environment. The penetration tester needs to d
yulyashka [42]

Answer:

Port scanner

Explanation:

The penetration tester would most likely use a port scanner. A port scanner can be explained to be an application that is made to check a server or host for ports that are open. This application can also be used by administrators to check their security networks so as to know those network services that are running on a host and also to know existing vulnerabilities. Attackers also use this to exploit victims.

5 0
3 years ago
Which line of code will print I like to code on the screen? print("I like to code") print(I like to code) print("I LIKE TO CODE"
Bad White [126]

Answer:

print("I like to code")

Explanation:

In the Programming Languages, print() function is used to print any string, display any output or both at the same time as well as we can print it one by one. We can also print addition, subtraction, multiplication and other problems directly without saving it in other objects or variables.

In the above statement, the correct method of printing any string is to write that string inside the parameter with a double-quote.

The second option is incorrect because in it double-quote is not used.

The third option is incorrect because the following sequence is not correct.

4 0
3 years ago
Read 2 more answers
A display that is thin flexible, light, and easy to read in all types of light is an
Nuetrik [128]

Answer; Electric Paper Display

Explanation:

<em>"PDs are extremely thin and only require power when a new image is requested. Instead of a traditional display that uses backlighting to illuminate pixels, an EPD is based on the scientific phenomena known as "electrophoresis," the movement of electrically charged molecules in an electric field."</em>

Above is the definition, as you can see it resembles your question greatly so this is most likely the answer you're looking for.

Good luck :D

8 0
3 years ago
Read 2 more answers
Other questions:
  • If you’re storing some personal information like Debit/Credit card numbers or Passwords etc, on different sites for running you’
    10·1 answer
  • Every character is represented by a code. The ASCII code for upper letter A is 65 and for lower a is 97. Similarly the numeric c
    9·1 answer
  • Under what circumstances are composite primary keys appropriate?
    5·1 answer
  • Given the strings s1 and s2 that are of the same length, create a new string consisting of the first character of s1 followed by
    12·1 answer
  • Data types influence the following in the workflow: (Select all that apply)a. the color choices and layout decisions around comp
    15·2 answers
  • To what would you compare the transport layer?
    12·1 answer
  • Walt has selected data in a worksheet and inserted a chart. However, the chart is inserted right on top of the data set, and he
    14·2 answers
  • What is the orbit? Define
    12·1 answer
  • For questions 3-6, consider the following two-dimensional array:
    11·2 answers
  • What would be an ideal scenario for using edge computing solutions?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!