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
guapka [62]
3 years ago
15

Create a variable total of type Double set to 0. Then loop through the dictionary, and add the value of each integer and double

to your variable's value. For each string value, add 1 to the total. For each boolean, add 2 to the total if the boolean is true, or subtract 3 if it's false. Print the value of total.
Computers and Technology
1 answer:
svp [43]3 years ago
6 0

Answer:

total = 0.0

for x in dictionary.values():

   if x == str(x):

       total += 1

   elif x is bool:

       total += 2 if x is True else total -3

   else:

       total += x

print( total )

Explanation:

The python source code defines a variable 'total' and iterates through a dictionary and adds its values to the total variable. Finally, the total value is printed.

You might be interested in
Which of the following is the main consideration when choosing an appropriate outlet box?
mafiozo [28]
How much power is going through the out let <span />
4 0
3 years ago
Read 2 more answers
The largest type of computer system with the most extensive storage capacity and the fastest processing speeds is a ________.
azamat
Super Computer. Hope I helped.
5 0
3 years ago
A person who creates a computer virus is a (1)system analyst (2) techician(3) programmer​
mars1129 [50]

Answer:

a person who creates a computer virus is a programmer

8 0
3 years ago
Read 2 more answers
​In terms of e-commerce infrastructure, the Web server's required amount of storage capacity and computing power depends primari
Tamiku [17]

Answer:

Option A is correct

Explanation:

The computing power of a web server and the storage capacity mostly depend on the software that run the server and the volume of e-commerce transactions.

8 0
4 years ago
Read 2 more answers
A ________ power station uses the energy from a small piece of metal called Uranium ​
grigory [225]

Answer:

nuclear power plant

Explanation:

A nuclear reactor, or power plant, is a series of machines that can control nuclear fission to produce electricity. The fuel that nuclear reactors use to produce nuclear fission is pellets of the element uranium. In a nuclear reactor, atoms of uranium are forced to break apart.

3 0
4 years ago
Read 2 more answers
Other questions:
  • Which of these can be considered data?
    14·2 answers
  • By default, what is the largest data payload that packets on an ethernet network can accept?
    11·1 answer
  • What is the definition of a protocol, as it applies to networks?
    8·1 answer
  • Based on your understanding of Moore’s Law, what do you predict will be the next trend in the evolution of computers?
    10·1 answer
  • Consider the classes below: public class TestA { public static void main(String[] args) { int x = 2; int y = 20 int counter = 0;
    8·1 answer
  • Suppose a host has a 1-MB file that is to be sent to another host. The file takes 1 second of CPU time to compress 50%, or 2 sec
    12·1 answer
  • Where do animators work?
    6·1 answer
  • Write a method named numUnique that accepts a sorted array of integers as a parameter and that returns the number of unique valu
    15·1 answer
  • Areas on which the development of the computer as a communication technology is based
    5·1 answer
  • Global communication and transportation technologies are an example of a(n) ____
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!