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
hichkok12 [17]
3 years ago
15

The function below takes one parameter: a dictionary (dictionary). Complete the function so that it prints out each value stored

in the dictionary, each on a separate line. Recall that dictionaries store key:value pairs. Also, when you iterate through a dictionary with a for loop, you are interating through the keys. For this question, you'll need to lookup each key in the dictionary to find its value.
Computers and Technology
1 answer:
frosja888 [35]3 years ago
3 0

Answer:

  1. def processDict(dict):
  2.    for x in dict:
  3.        print(dict[x])
  4. dictA = {
  5.    "Name": "Tom",
  6.    "Age": 21,
  7.    "Gender": "Male"
  8. }
  9. processDict(dictA)

Explanation:

Firstly create a function and name it as processDict that takes one input dictionary, dict (Line 1).

Create a for loop to iterate through each of the dictionary key, x, and use that key to look up the corresponding value and print it out (Line 2-3).

We test the function using a sample dictionary (Line 5-11). We shall get the output:

Tom

21

Male

You might be interested in
Black Ops 3 For Ps4 Players Here
masha68 [24]

Answer:

Love black ops

6 0
3 years ago
A wireless (radio) transmission of data can only travel a short distance.<br><br> True or false?
timofeeve [1]

I believe this is false as some radio waves can travel beyond our solar system

7 0
3 years ago
You are going to write a program for Computer test which will read 10 questions from a file, order them randomly and provide the
ollegr [7]

Answer:

from pprint import pprint

import random

match = {

   "mcq1": "a",

   "mcq2": "c",

   "mcq3": "c",

   "mcq4": "d",

   "mcq5": "a",

   "mcq6": "a",

   "mcq7": "a",

   "mcq8": "b",

   "mcq9": "d",

   "mcq10": "a"

}

file = open("test","r")

questions = set()

for i in range(10):

   ques = []

   for line in file:

       if "-" in line:

           break

       else:

           ques.append(line)

   questions.add(tuple(ques))

def quiz(questions, match):

   questions = list(questions)

   marks = 0

   for i in range(10):

       pprint(questions[i])

       mcq = "mcq",str(i+1)

       mcq = list(mcq)

       answer = input("enter your answer: ")

       if answer == match["".join(mcq)]:

           marks += 1

   return marks

print("Your score is: ",quiz(questions, match))

Explanation:

the file which has been loaded is test, and its data is provided below...

mcq1. The device which converts analog signals to digtital signals and vice versa is called.

a) mother board

b) TAP

c) Modem

d) I/O device

-

mcq2. The main components of a computer system are.

a) TAP, CPU, Printer

b) CPU, Input device

c) CPU, ALU, CU

d) CPU , Output device , Memory unit, Control unit

-

mcq3. A source program is a program.

a) writter in machine laguage

b) translated in machine langaue

c) written in high level language

d) required to boot a computer

-

mcq4.Which image format supports transparency in images.

a) PNG

b) GIF

c) JPG

d) A & B

-

mcq5. (10111) 2 = (?) 10.

a) 23

b) 50

c) 24

d) 89

-

mcq6. UNICODE is an example of.

a) character encoding set

b) driver

c) software

d) database

-

mcq7. (10111) 2 = (?) 10.

a) 23

b) 50

c) 24

d) 89

-

mcq8. NTFS stand for.

a) Network File Saving

b) New Technology File System

c) Newt Trend File Saving

d) Non Technology File System

-

mcq9. FF is example of.

a) Octal number system

b) Binary Number System

c) Decimal Number System

d) Hexadecimal number system

-

mcq10. Emails are sent with the help of ?

a) SMTP

b) FTP

c) HTTP

d) UDP

-

3 0
4 years ago
Which two computer peripherals are connected to the computer through a port?
chubhunter [2.5K]
Most computer devices are connected to the computer through port
Keyboard through usb port
Printer through usb port
Hand point device through usb port
Also computer equipped with LPT port for printers and COM port for additional devices like external modems e.t.c
7 0
4 years ago
Nina is trying to learn more about how computers work. She has repeatedly read that the motherboard is the "brain” of the comput
Lady bird [3.3K]

Its

Processes the data on the computer .

5 0
3 years ago
Read 2 more answers
Other questions:
  • What does BMP stand for?
    10·2 answers
  • What is the unique impact him professionals have on coded data?
    11·1 answer
  • You can create a database using one of the many templates available or by creating a new ______ database.
    9·1 answer
  • The local emergency manager has the responsibility for coordinating emergency management programs and activities. A local emerge
    7·1 answer
  • list six external parts or peripherals of a computer system and identify which are output and which are input devices
    8·1 answer
  • Identify a factor that is unlikely to influence the length of time people wait in the lunch line.
    8·2 answers
  • Project: Math Tutor Program with Error Handling
    9·2 answers
  • Is there anyone that knows how to work in Microsoft Access and someone that could help me on my test at 11 30am?​
    7·1 answer
  • Which is a concept of the CIA of Computer Security
    7·1 answer
  • Copy the formula in cell M7 to the range M8:M15, and edit the copied formulas to return the value from the column indicated by t
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!