Codehs 9.4.5 Phone Book. Anyone have the answers?

Answers

Answer 1

Answer:

The program is as follows:

phonebook = {}

while True:

   entry_name = input("Name: ")

   if entry_name == " ":

       break

   elif entry_name in phonebook:

       print(entry_name+" exists with the phone number "+str(phonebook[entry_name]))

   else:

       entry_number = input("Number: ")

       phonebook[entry_name] = entry_number

print(phonebook)

Explanation:

This creates an empty dictionary for phonebook

phonebook = {}

This loop is repeated until it is exited by the user

while True:

Prompt for name

   entry_name = input("Name: ")

If name is empty

   if entry_name == " ":

Exit the loop

       break

Else if name exists in the phonebook

   elif entry_name in phonebook:

Notify the user with the name and the phone number

       print(entry_name+" exists with the phone number "+str(phonebook[entry_name]))

If otherwise,

   else:

Prompt the user for phone number

       entry_number = input("Number: ")

Save in the dictionary

       phonebook[entry_name] = entry_number

Print the phonebook

print(phonebook)

Answer 2

Answer:

my_dictionary = {}

while True:

   name = str(input("Enter a name: "))

   if name == "":

       break

   elif name in my_dictionary:

       print("Phone Number: " + my_dictionary[name])

   else:

       phone_number = input("Enter this person's number: ")

       my_dictionary[name] = phone_number

print(my_dictionary)

Explanation: code hs


Related Questions

An electrician uses a device called a volt meter. The volt meter is an example of
O hardware
software

Answers

Answer:

hardware

Explanation:

A voltmeter can be defined as an electrical device used for measure voltage level or the amount of voltage present in a circuit.

In this scenario, an electrician uses a device called a volt meter. The volt meter is an example of hardware.

A hardware refers to any device, machine or equipment that can be handled physically (touched) and seen with the naked eyes. Other hardware components of a computer includes monitor, speaker, central processing unit, motherboard, hard-drive, joystick, mouse, keyboard, etc.

On the other hand, software component of a computer comprises of software application or program that are used by the computer to manage or control software application, computer hardware and user processes. Some examples of software components are operating system, registry keys, antivirus, media player, word processor, etc.


What is the default view in a Word document? (5 points)
Copy View
Editing View
Paste View
Reading View

Answers

Answer:

EDITING VIEW

Explanation:

Although Microsoft word has several different ways you can view or edit your documents.
The Default View is Editing View.

Choose the type of collection described.

A ___ uses square brackets. You use append to add to the collection.
A ___ uses curly brackets. You use update to add to the collection.
A ____ uses parentheses. You cannot change it once you create it.

Answer choices for all three:
•List
•Tuple
•Dictionary

Answers

Answer:

1) List

2) Dictionary

3) Tuple

Explanation:

A list uses square brackets. It is used to store multiple items in just one variable. They are usually changeable and give room for duplicates. You use append to add to the collection.

A dictionary uses curly brackets. You use update to add to the collection. A dictionary is created by placing the elements in curly brackets and separating them with a comma. It is changeable and it does not give room for duplicates.

A tuple uses parentheses. You cannot change it once you create it. It is an ordered list of elements that is finite and can also store multiple items in one variable.

can somebody help me with this plzzz, I watched the video but I don’t got it :’(

Answers

Answer:

n,

Explanation:

The answer is n. Hope this helps

Which of the following is the ONE most important thing to be done before working on any electrical device? a Remove each source of electricity b Ground yourself c Shut Down d Turn it off

Answers

Answer:

b

Explanation:

because evven tho it can turn of doesnt mean the eletricity will stop

Use the drop-down tool to select the correct answer.

Government agencies work to catch people who engage in software piracy, and can also help to stop them by filing lawsuits.

Answers

Answer:

Software producers

Explanation:

Patent can be defined as the exclusive or sole right granted to an inventor by a sovereign authority such as a government, which enables him or her to manufacture, use, or sell an invention for a specific period of time.

Generally, patents are used on innovation for products that are manufactured through the application of various technologies.

Basically, the three (3) main ways to protect an intellectual property is to employ the use of

I. Trademarks.

II. Patents.

III. Copyright.

Copyright law can be defined as a set of formal rules granted by a government to protect an intellectual property by giving the owner an exclusive right to use while preventing any unauthorized access, use or duplication by others.

Hence, government agencies work to catch people who engage in software piracy, and software producers can also help to stop them by filing lawsuits. Software producers or developers are saddled with the responsibility of filing lawsuits against pirates or intellectual property theft who engages in the illegal use of patents or licensed software applications.

What type of hacker would a company hire to check for vulnerabilities in their web page?

Answers

A white hat hacker or a certified ethical hacker.

Answer:

a hacker who can infiltrate a highly protected file but cant protect themselves against anime web site ads cant tell if this was a real question if so sorry

Explanation:

A person who is good with numbers and problem solving has which type of learning preference?
a) hands-on
b) verbal
c) logical
d) visual

Answers

Answer:

I believe it is logical.

Answer:  c) logical

Explanation:

:)

Which import option is not supported in Access 2016?

from Access
from Excel
from PDF
from Text file

Answers

Answer: from PDF(C)

Explanation:

Took it on edg

Answer:

C

Explanation:

HOW DO YOU RUN YOUR SCRATCH PROGRAM?

Answers

Answer:

By clicking on the green flag, it starts up the program and if you want to stop it use the stop sign.

To run your scratch program you have to click the green flag, and it will run your program.

Hope that helps.

snoopdog is 420 in dog years

Answers

lol are yhu good????

Answer:

really wow that’s cool

Hello anyone to speak?

Answers

Answer:

hey hope you have a good day or night :)

What is the use of Ellipse Tool in photoshop

Answers

The Ellipse Tool creates elliptical shapes and paths (shape outlines) it’s also used for elliptical, including circular, selections. You can easily select objects such as clocks, balls, and full moons by using this tool. There is a keyboard shortcut where if you see the elliptical tool in the tool box, you can press M on the keyboard, if you see a rectangular tool, press shift + M together on the keyboard. Hope that helped!

What is Qbasic programming language?​

Answers

Answer:

QBASIC is a high level programming language that allows us to write programs. BASIC uses English like words and mathematical symbols to write programs. The programs written in QBASIC need to be converted into machine codes. QBASIC provides working area to write programs and QBASIC has its own Interpreter

Explanation:

(20points)
Why did Jinny get an error when she tried to use the variable 1stName?

Variables should be two words.
Variables cannot begin with a digit.
Variables should start with a number.
Variables should always be camelCase

Answers

Answer:

PLEASE LISTEN TO ME!! THE OTHER ANSWER IS WRONG!

Explanation:

The correct anwer is "Variables cannot begin with a digit"

Pie charts are best used for

Answers

Answer:B

Explanation:Showing parts of a whole.

In a single paragraph, write about the connections between web servers and web pages. Select and differentiate between their various characteristics and how they work together.

Edge please don't copy paste, 20 points

Answers

Answer:

web servers hold all the info that the website has on it, most servers hold multiple websites

Explanation:

Answer:

web servers hold all the info that the website has on it, most servers hold multiple websites

Explanation:

Using the information below, answer the question to the right. Which function should you use to extract shipping values from the Lookup Table?

Answers

Answer: HLookup

Explanation:

HLookup is a function in Microsoft Excel that is part of the Lookup functions, that is, it is used to lookup a value from another table or cell so that it reflects in the desired table.

The “H” in the HLookup stands for Horizontal, that is Horizontal Lookup.

The HLookup function works by looking for a value in the top row of a table or array of values and returning the value in the same column from a row that is specified.

The function is;

=HLOOKUP(lookup_value, table_array, row_index_num, [range_lookup])

So, to extract our shipping value from the lookup table, we use the formula;

=HLOOKUP(C2,$B$11:$E$12,2)

What is a method that deletes an item from a list using the item’s value?
Remove
Delete
Erase
PopWhat is a method that deletes an item from a list using the item’s value?
Remove
Delete
Erase
Pop

Answers

Answer:

Remove

Explanation:

A method that deletes an item from a list using the item’s value is "Remove"

The "remove () function in python language indicates the specific element or character to be that needs to be removed.

For example

myList = ["Jane",16,34,52,"Lamar",13,27,20]

myList.remove(34)

myList

OUTPUT : ["Jane",16,52,"Lamar", 13,27,20]

Therefore, by printing the list using the print(), we can observe that the element 34 has been removed from myList.

Hence, the correct answer, in this case, is " Remove."

Cybersecurity breaches in the workplace generally happen because _____. Select 3 options.


people make unintentional mistakes


people do not know about cybersecurity protocols


workplaces tend to have too strict cybersecurity protocols


cybersecurity specialists do not really help


people deliberately try to hack into the network

Answers

Answer:

people make unintentional mistakes

people do not know about cybersecurity protocols

people deliberately try to hack into the network

Explanation:

Cyber security breaches are the compromise to the data integrity of a computer system or network. There are several reasons why this can happen in the network f an organization. Some of them include;

1. People make unintentional mistakes: Human error has been attributed to be the leading cause of cybersecurity breaches. When people unknowingly expose passwords and sensitive data to those who should not have access to them, they commit a breach of security.

2. People do not know about cybersecurity protocols: When people are not educated on the right security measures to adhere to, they are prone to unknowingly engage in acts that will lead to a security breach.

3. People deliberately try to hack into the network: People within and outside the organization can decide to compromise the network especially if they believe that they will have some financial benefits.

How would I tell Tracy to move forward 100 pixels?

Answers

Answer:

Though the forward(100) command will move Tracy forward 100 pixels, the command backward(-100) can also be used.

Explanation:

Answer:Though the forward(100) command will move Tracy forward 100 pixels, the command backward(-100) can also be used.

Explanation:

Write IF() function for student 3, If total mark is greater than 10 then print
the text “you have scored good" else print“ you need to improve" *

Answers

Answer:

Explanation:

The following code is written in Java. The if() function is actually called an if statement. The following code can be copied and pasted where you need as long as it is within the scope of the mark variable in order to call it and compare it to 10

if (mark > 10){

           System.out.println("you have scored good");  

       } else {

           System.out.println("you need to improve ");

       }

is this right or not???????????

Answers

I think it’s true Bc some people may use different techniques

Answer:

yes you are correct

Explanation:

Help!!!! Arrays 100 points

Answers

Answer:

2 weeks ago so i think your doe with the quiz

Explanation:

Answer:

i hate to do this but I'm desperate.

Explanation:

you have no keywords in the question and this was months ago, these points are just going to waste and I need them, sorry & thanks

It is used between two or more computers. One computer sends data to or receives data from another computer directly.

Answers

Answer:

File transfer protocol (FTP)

Explanation:

An information can be defined as an organized data which typically sent from a sender to a receiver. When a data is decoded or processed by its recipient it is known as information.

Generally, there are several channels or medium through which an information can be transmitted from the sender to a receiver and vice-versa. One of the widely used media is the internet, a global system of interconnected computer networks.

There's a standard framework for the transmission of informations on the internet, it is known as the internet protocol suite or Transmission Control Protocol and Internet Protocol (TCP/IP) model. One of the very basic rule of the TCP/IP protocol for the transmission of information is that, informations are subdivided or broken down at the transport later, into small chunks called packets rather than as a whole.

The three (3) main types of TCP/IP protocol are;

I. HTTP.

II. HTTPS.

III. FTP.

File transfer protocol (FTP) is used between two or more computers. One computer sends data to or receives data from another computer directly through the use of network port 20 and 21.

WHAT DOES THE SCRATCH CODE BELOW DO?

Answers

Answer:

the first one

Explanation:

What is digital scavenger hunting? A. An application that locates addresses B. A scavenger hunt where players use GPS and digital cameras C. A game like Marco Polo on the Internet D. A way of tracking criminals using GPS​

Answers

Answer:

C. A game like Marco Polo on the Internet

Explanation:

A digital scavenger hunt is a name for a scavenger hunt game originally made for mobile phones and works on any operating system or mobile platforms such as Android or iOS.

The game comprises of different missions in which players are expected to complete one after the other.

Hence, in this case, the correct answer is "A game like Marco Polo on the Internet."

A(n) ________ is a chart based on PivotTable data.
(Microsoft Excel)

A. Slicer

B. PivotChart

C. Filter

D. Sort

Answers

Well since it’s a chart based on a PivotTable prettyyyy sure it’s gonna be a PibltChart

I made a fish emoji what do you think >{'_'}< should I change anything

Answers

Answer: It is beautiful

Explanation:

☁️ Answer ☁️

666/69 I like it. : )

What the price of XRP right now??????

Answers

Answer:

$0.579

Explanation:

I'm pretty sure that's the answer.

Other Questions
[Inequalities]Please help and thanks. Please help! sort the equations by whether they are polynomial or not (picture attached) Just help, what are the answer, Its due in 15 minutes and yea, ill mark brainliest and dont give me a link saying the answer is there, thanks ^-^ I need this answer ASAP describe problem and solution text structure Using the coordinate plane shown below, a third point is plotted 5 units to the right of (-4, 4). Where should a fourth point be plotted in order to create a rectangle?(1, -4)(1, 4)(4, -1)(-4, 1) Use the drop-down menus to identify the order of these images for the formation of our solar system. A collapsed nebula flattens into a disc. A collapsed solar nebula. An image of our solar system. nebula. An image of our solar system. I need this ASAP please help me!!!!!!!!!!The main ______________ occurs between the old queen bee and her ______________ Liz flips a coin 70 times. The coin lands heads up 42 times and tails up 28 times. Complete each statement. 6. 10-2 is how many times as large as 2 . 10-8? A toy manufacturer is shipping its newest product, an interactive talking globe, to a major toy store. The packaging for the globe is a rectangular prism that measures 2512 2512 inches high, 18 inches long, and 18 inches wide. The boxes for the globes are packaged into shipping crates that hold 8 globes each. What is the minimum volume of one shipping crate? Explain your answer in the space provided. Please help me with this!! how many solutions d+6+2d=4d+9 In XYZ, z = 49 inches, X=9 and Y=108. Find the area of XYZ, to the nearest square inch. Find the area of the shaded polygons when a hockey player strikes a moving ball in the direction of its motion, the speed of the ball______. A marathon runner is running a race. During the race the marathon runners heart rate and breathing increases. Which of the following explains why the marathon runners' body is responding in this way? plzzzz help meee....... Which two elements of history does this passage help readers connect to? having yellow fever being a constable living during the yellow fever epidemic having a grandfather knowing someone with yellow fever How much food does a Central American farmer grow?enough for their own familynot enough to pay the rentenough to sell to othersnot enough for their own family