write a program that keeps names and email addresses in a dictionary as key-value pairs. the program should display a menu that lets the user look up a person’s email address, add a new name and email address, change an existing email address, and delete an existing name and email address. the program should save the data stored in a dictionary to a file when the user exits the program. each time the program starts, it should retrieve the data from the file and store it in a dictionary. the program should include the following functions: a. a function to display a menu. b. a function to look up a person’s email address. c. a function to add a new name and email address. d. a function to change an email address. e. a function to delete a name and email address. f. a function to load emails from a file. g. a function to save emails in a file. h. write main function with a loop that displays the menu allowing the user to select an operation from the menu; the program continue until the user enter 5. i. validate all user input. your program should check user input; for example, if the user wants to search or delete a name that does not exist in the dictionary, you should print something like the name is not in the database. if the user selects invalid operation from the menu, the program prints an error and allows the user to renter a valid operation; the program continue asking for a valid operation until a user selects a valid operation.

Answers

Answer 1

To write a program that keeps names and email addresses in a dictionary as key-value pairs check the code given below.

What is key-value pairs?

In a key-value pair, two related data elements are combined: a value, which is a variable that belongs to the set (for example, male/female, green, 100), and a key, which is a constant that defines the data set (for example, gender, color, price).

A key-value pair could look something like this when fully formed:

gender = male

color = green

price > 100

↓↓↓//Python code//↓↓↓

import pickle

import sys

try:

   f=open('email.dat','rb')

   d=pickle.load(f)  

   f.close()

     

except:    

   d={}

while True:

   print('\n1. Find a email address')

   print('2. Add name and email address')

   print('3. Change an email address')

   print('4. Delete an email address')

   print('5. Exit\n')

   choice=input('\nEnter a choice: ')

   if choice:

       choice=int(choice)

   else:

       print('\nEnter a number')

       continue    

   if choice == 1:

       while True:

           name=input('\nEnter the name ')

           if name:

               if name in d:

                   print('\n%s is the email id of %s \n' % (d[name],name))

                   break

               else:

                   print('\n Email not found \n')

                   break

           else:

               print('\nName cannot be empty\n')

               continue

           

   elif choice==2:

       while True:            

       

           name=input('\nEnter the name ')

           if name:

               break;

           else:

               print('\nName cannot be empty \n')

               continue

       while True:            

       

           email=input('\nEnter the email address ')

           if email:

               d[name]=email

               break

           else:

               print('\nEmail cannot be empty\n')

               continue

           

   elif choice==3:

       while True:            

       

           name=input('\nEnter the name to change the email address ')

           if name:

               if name in d:

                   email=input('\nEnter the new email address ')

                   d[name]=email

                   print('\nEmail address changed \n')

                   break;

               else:

                   print('\nName not found \n')

                   break

           else:

               print('\nName cannot be empty \n')

               continue

           

   elif choice == 4:

       while True:            

       

           name=input('\nEnter the name to remove ')

           if name:

               if name in d:

                   del d[name]

                   print('\nName and Email address removed \n ')

                   break;

               else:

                   print('\nName not found \n')

                   break

           else:

               print('\nName cannot be empty\n')

               continue

   elif choice == 5:

       

       f=open('email.dat','wb')

       pickle.dump(d,f)

       f.close()

       sys.exit()

   else:

       print('\nEnter a valid choice ')    

Learn more about key-value pair

https://brainly.com/question/29414672

#SPJ1


Related Questions

you need to create a shared folder on a computer running windows 10. it must have following parameters: located in c:\corpdata; domain users of practicelabs domain must have full access to it. which windows powershell command you need to run?

Answers

There are no quotation marks around the security group Domain Users or the domain name practicelabs, which prevents Windows from mapping account names to security IDs.

What is meant by Domain users?

Any user whose username and password are saved on a domain controller rather than the machine they are logging into is referred to as a domain user. The computer queries the domain controller to determine your privileges when you log in as a domain user.

Users who are added to the domain users group on a domain controller are known as domain users. At the server, these domain users can be centrally managed. While local users are those who have been added to the local system. You can choose users in BPC from one of these options alone or in combination.

The complete question is : You created a folder named "codeplans" on a domain member server. You want to share this folder and entered the following Windows PowerShell command:

New-SmbShare -Name "codeplans" -Path "c:\corpdata" -Fullaccess practicelabs\domain users

You get the following error message which you saved as a screenshot. What is cause of this error message?

To learn more about Domain user refer to :

https://brainly.com/question/14481481

#SPJ1

5) what is the running time of quicksort (with the middle element of the input array used as the pivot), and why for: reverse sorted

Answers

n*log(n) will be the running time of quicksort with the middle element of the input array used as the pivot.

What is Quicksort?

Quick sort is a highly efficient sorting algorithm that divides a large array of data into smaller arrays. A large array is partitioned into two arrays, one of which contains values less than the specified value, say pivot, on which the partition is based, and the other of which contains values greater than the pivot value.

Quicksort divides an array and then recursively calls itself twice to sort the two resulting subarrays. This algorithm is very efficient for large data sets because its average and worst-case complexity are both O([tex]n^{2}[/tex]).

To know more about Quicksort, visit: https://brainly.com/question/13155236

#SPJ4

which is the better memory architecture for cloud? shared memory architecture or distributed memory architecture?

Answers

The majority of cloud systems are constructed using a grid layout. Grid is a sort of distributed computing architecture where businesses that own data centers work together for the benefit of everybody.

Which is the most cloud architecture?The majority of cloud systems are constructed using a grid layout. Grid is a sort of distributed computing architecture where businesses that own data centers work together for the benefit of everybody.The way technological elements come together to create a cloud, where resources are pooled through virtualization technology and shared across a network, is known as cloud architecture.It makes it simple for organizations to scale up and down their cloud resources. Businesses benefit from its adaptability characteristic, which offers them a competitive edge. Higher security is provided, and catastrophe recovery is improved. Its services are updated automatically.

To learn more about cloud systems  refer,

https://brainly.com/question/19057393

#SPJ4

Systems analysts use a(n) _____ test to verify that all programs in an application work together properly. (525)
a. unit
b. systems
c. integration
d. acceptance

Answers

Systems analysts use an unit test to verify that all programs in an application work together properly. So the answer is a. unit

Unit testing

Unit testing is a type of software testing that tests individual units or components of the software. Its purpose is to verify that each unit of software code is working as expected.

Unit tests are run by the developer during application development (coding phase). Unit tests isolate sections of code and verify their correctness. Units can be functions, methods, procedures, modules or individual objects.

Learn more about Unit Testing: https://brainly.com/question/22900395

#SPJ4

your organization has just approved a special budget for a network security upgrade. what procedure should you conduct to make recommendations for the upgrade priorities? security audit posture assessment exploitation data breach

Answers

Answer: Security Audit needs to be done.

A security audit is a comprehensive assessment of your organization’s information system; typically, this assessment measures your information system’s security against an audit checklist of industry best practices, externally established standards, or federal regulations.

security audit works by testing whether your organization’s information system is adhering to a set of internal or external criteria regulating data security. Internal criteria includes your company’s IT policies and procedures and security controls. External criteria include federal regulations like the Health Insurance Portability and Accountability Act (HIPAA) and Sarbanes-Oxley Act (SOX), and standards set by the International Organization for Standardization (ISO) or the National Institute for Standards in Technology (NIST). A security audit compares your organization’s actual IT practices with the standards relevant to your enterprise, and will identify areas for remediation and growth. 

To know more about Security Audit , click here :

https://brainly.in/question/7497435


#SPJ4

c. a new shopping mall has obtained an ipv4 network address, 205.72.16.0 /24. management of the shopping mall would like to create 6 subnets with each subnet serving 32 hosts. could it be done? demonstrate the reason with numbers. (10 points)

Answers

The solution is 256-248 = 8, 16, and 24. The broadcast address of the 16 subnet, where this host is located, is 23, and the range of acceptable hosts is 17–22.

This equals 254 after subtracting the 2 reserved addresses. You will therefore receive 254 valid hosts with the chosen subnet mask. The ability to assign 62 hosts an IP Address via a /24 subnet would be possible regardless of whether the IP Address is private or public. /16 would produce 65,534 hosts (or 124.125.0.1 - 124.125.1) as a result. This indicates that a "/16" leaves the final 16 bits (or final two integers) available for usage in specified addresses and a "/8" leaves the final 24 bits available for use.

Learn more about address here-

https://brainly.com/question/16011753

#SPJ4

When logging into a website that uses a directory service, what command authenticates your username and password?.

Answers

Answer: Bind If you log into a website that uses a directory service, the website will use LDAP to check that user account is in the user directories and that the password is valid

Explanation:

when you click the lines button in the intraprocedural workspace, where can you look to see if a line has already been placed and documented on the patient

Answers

You can check to see if a navigational line has already been drawn and recorded on the patient. You may swiftly move on to the area you need by using navigation to keep track of where you are.

What is navigation in MS.OFFICE?

The term "navigation" describes a functionality in Ms. office. Users of Word are able to swiftly move to the content they are working on thanks to the Navigation Pane function. If you frequently work with lengthy Word documents, you can discover content, browse page by page, and reorganise your document using the Navigation Pane. You can utilise your keyboard's Ctrl+F shortcut to access the navigation in Microsoft Office.

To learn more on navigation in ms office follow this link:

You can check to see if a navigational line has already been drawn and recorded on the patient. You may swiftly move on to the area you need by using navigation to keep track of where you are.

The term "navigation" describes a functionality in Ms. office. Users of Word are able to swiftly move to the content they are working on thanks to the Navigation Pane function. If you frequently work with lengthy Word documents, you can discover content, browse page by page, and reorganise your document using the Navigation Pane. You can utilise your keyboard's Ctrl+F shortcut to access the navigation in Microsoft Office.

Visit brainly.com/question/29401885 to learn more about navigation.

https://brainly.com/question/29672273

#SPJ4

the technique where each task is represented by a box that contains a brief description of and duration for the task is known as:

Answers

Gantt charts are a method in which each task is depicted by a box with a brief explanation and time for the task.

what is technique?

A technique is a way of carrying out a task or carrying out an action. You might use your teeth to pull the top off of drinks to open them. If that's so, your dentist had better have a reliable method for mending teeth. Technique can also be used to describe someone's proficiency with the principles of a given task. For instance, a violinist may have superb skill but lack enthusiasm. Most writers use highly distinctive writing methods: Some people must write by hands on paper; others may need to write early in the day and late at night.

To know more about technique
https://brainly.com/question/4779871
#SPJ4

open the code6-3 columns.css file and create a style rule for the article element to display the contents in a 3 column layout with a minimum column width of 350 pixels,

Answers

To open the code 6-3 column.css file and create a style rule following command will be used/* 1(a). style rule for article element*/

article{

/*setting column numbers*/

column-count: 3;

column-width: 350px;

/*setting gap between columns*/

column-gap: 20px;

/*setting rule parameters between columns*/

column-rule: 5px ridge rgb(231, 231, 231);

}

/* 1(b). style rule for h1 element*/

h1{

/*setting span across all columns*/

column-span: all;

/*setting alignment to center*/

text-align: center;

/*setting font size*/

font-size: 3.5em;

/*setting letter spacing*/

letter-spacing: 0.15em;

}

/* 1(c). style rule for paragraph element in article*/

article:: p{

/*setting minimum window size to 4 line*/

   widows: 4;

   /*setting minimum orphans to 4 line*/

   orphans: 4;

}

To learn more about code

https://brainly.com/question/497311

#SPJ4

which of the four criteria is occurring when a network confirms that a transaction has not yet occurred on the blockchain?

Answers

A transaction is stored in the case when a network confirms that a transaction has not occurred yet on the blockchain. Hence, option C 'a transaction is stored' is the correct answer.

Blockchain is a system of recording information in such a way that makes it difficult or impossible to hack or change the system. A blockchain is generally a digital ledger of transactions that is replicated and distributed across the whole network of computer systems on the blockchain. In other words,  blockchain is a distributed public digital ledger that is used to record transaction-related information across many computers so that the transactional records cannot be altered retroactively without the modification of all subsequent blocks and the consensus of the network.

"

Complete question is:

which of the four criteria is occurring when a network confirms that a transaction has not yet occurred on the blockchain?

A. a hash is added to the block

B. a transaction occurs

C. a transaction is stored

D. a transaction is verified

"

You can learn more about Blockchain at

https://brainly.com/question/25700270

#SPJ4

1. many companies have a policy of having two (or more) routers connecting the company to the internet to provide some redundancy in case one of them goes down. is this policy still possible with nat? explain your answer. (10 points)

Answers

Yes this policy is still possible with nat. An second Wi-Fi router can help you secure your network or set up a separate network on top of expanding the signal strength and coverage area of a network.

You would be aware of the dead zones—the room on the first floor, your yard, or the extra bedroom converted into a home office—if your home or business just had a single wireless network. You can fill in these dead spots and revive them with speedy radio frequencies by installing an additional router.

All you have to do is connect the secondary router to the primary router, either wirelessly or with cables, and set it up as an access point. For wired connections, you would need to attach the Ethernet cable to the second router's WAN port and the LAN port of your primary router, respectively.

To know more about router click here:

https://brainly.com/question/15851772

#SPJ4

for what purpose would computer 1 send a ff:ff:ff:ff:ff broadcast arp message to all nodes on network a?

Answers

Understanding ARP Broadcast Message helps explain how and why it's important to map an IP address to a MAC address in Ethernet networks.

ARP broadcast message: what is it?Understanding ARP Broadcast Message makes it easier to comprehend how and why it's crucial in Ethernet networks to map an IP address to a MAC address.Data Link Layer uses the Address Resolution Protocol (ARP) to perform the following two fundamental tasks: Maintain a Cache Table of MAC to IP addresses, and resolve IPv4 or IPv6 addresses to MAC addresses.ARP service is used to resolve an IP address to a MAC Ethernet address and DNS service to translate a name to an IP address.With a broadcast destination MAC address of (FFFF.FFFF.FFFF), which signifies that all devices on this LAN will get this message, and a source MAC address of PC1 NIC interface as the sender, the Data-Link Layer encapsulates the IP packet inside an Ethernet frame.

To learn more about ARP broadcast message refer to:

https://brainly.com/question/29568812

#SPJ4

To identify a document as a draft, and not in final form, which of the following would you mostly likely add to the document?
A.Watermark
B. Template
C. Document property
D. Symbol

Answers

the answer is A) Watermark.

What is Watermark?

A watermark is a faint graphic or text that is overlaid on a document to identify it as a draft and not in final form.

Therefore, the answer is A) Watermark.

A template is a pre-formatted document that can be used as a starting point for new documents.

A document property is metadata associated with a document, such as the author or creation date.

A symbol is a graphical element used to represent a concept or idea, such as an emoji or icon.

To Know More About Watermark, Check Out

https://brainly.com/question/26321908

#SPJ1

what wireless security method allows you to configure access points to only allow connections from specific physical addresses belonging to devices you trust

Answers

The wireless security method allows you to configure access points to only allow connections from specific physical addresses belonging to devices you trust is Ad hoc wireless configuration mode

What is the purpose of ad hoc mode?

In order to link two or more wireless devices to one another without the need of standard network infrastructure equipment, such as a wireless router or access point, a wireless ad hoc network, or WANET, is a sort of local area network (LAN).

Therefore, in regards to the above, the use of Ad-hoc mode describes a wireless network architecture that enables direct device-to-device communication. An independent basic service set is a feature that is added and is specified in the 802.11 set of specifications (IBSS). Peer-to-peer mode is yet another name for this form of wireless network.

Learn more about wireless configuration from

https://brainly.com/question/9979629
#SPJ1

A data analyst writes the code summary(penguins) in order to show a summary of the penguins dataset. Where in RStudio can the analyst execute the code? Select all that apply. R console pane
Source editor pane Environment pane
Files tab

Answers

Code execution in Rstudio is analyzed in the R console panel and the Source editor panel.

Rstudio

R is a programming language for statistical computing and graphics, and RStudio is an integrated development environment. RStudio Server runs on a remote server and allows online browser access to RStudio, while RStudio Desktop is a regular desktop application. It has graphing, history, debugging, and workspace management features, as well as a console-based syntax highlighting editor that supports direct code execution.

An excellent environment for statistical computing and design is provided by RStudio, which provides numerous statistical-related libraries. An advantage of using R for this project is R's ability to easily reproduce and share your analysis.

Learn more about RStudio: brainly.com/question/29342132

#SPJ4

Fill in the blank: A data analyst is working with the World Happiness data in Tableau. To get a better view of Moldova, they use the _____ tool.
Single Choice Question. Please Choose The Correct Option ✔
A
Radial
B
Pan
C
Lasso
D
Rectangular

Answers

It is to be noted that where a data professional is working with data, to get a better view, they use the Pan tool. (Option B).

What is a pan tool in Data evaluation?

Pan allows us to shift the map to focus on it or present the areas in the way we wish. Simply pick the Pan Option and move the map around to suit your needs. Alternatively, you may move the map by holding down the Shift key.

The Pan tool is the most basic tool in the Tools list. It just allows you to rotate or pan the diagram. This is especially important after you have magnified the diagram. To use it, simply pick it from the Tools menu in the lower left corner of your screen.

A data professional examines data to uncover critical insights about a company's consumers and how the data may be utilized to address problems. They also share this information with corporate executives and other stakeholders.

Learn more about data professionals:
https://brainly.com/question/28893491
#SPJ1

Martin would like Word to sort a list of items after the data is already entered. Which of these is not a sort option?

Text
Symbol
Date
Number

Answers

Answer:

B. symbol

Explanation:

a user has opened a web browser and accessed a website where they are creating an account. the registration page is asking the user for their username (email address) and a password. the user looks at the url and the protocol being used is http. which of the following describes how the data will be transmitted from the webpage to the webserver?

Answers

Packets of the message are separated out. The recipient's equipment can still put the packets back together even if they are received out of sequence.

The computer sends a "GET" request to the server that hosts the web address once the user fills in the address. The GET request, which is made via HTTP, informs the TechTarget server that the user is trying to find the HTML (Hypertext Markup Language) code that defines the structure and appearance of the login page. Up until they arrive there, packets will move from machine to machine. The computer receiving the data puts together the packets like a puzzle as they come in to recreate the message. This idea underlies every data transfer over the Internet.

Learn more about machine here-

https://brainly.com/question/14417960

#SPJ4

if you have a subnet mask of 255.255.255.248, how many network bits and how many host bits are there?

Answers

Simply multiply 2 by 5 (25) to get the total number of subnets available, which comes out to 32.

Explain about the network bits?

Understanding the decimal and binary components of an IP address is a prerequisite for understanding subnetting. A 32-bit number, an IPv4 address is.

A network interface on a machine can only be uniquely identified by its IP address, which is a 32-bit value. The format of an IP address is commonly four 8-bit fields separated by periods, printed in decimal digits. An IP address byte is represented by each 8-bit field.

The IP address's octets are identified by a 32-bit number. For instance, 255.255.0.0, shown in Table 4.9, is a typical Class B subnet mask since the first two bytes are all ones (network) and the last two bytes are all zeros (host).

To learn more about network bits refer to:

https://brainly.com/question/14219853

#SPJ4

A data analyst wants to include a visual in their slideshow, then make some changes to it. Which of the following options will enable the analyst to edit the visual within the presentation without affecting its original file? Select all that apply.
Multiple Choice Question. Please Choose The Correct Options A. Copy and paste the visual into the presentation
B. Connect the original visual to the presentation via its URL
C. Embed the visual into the presentation
D. Link the original visual within the presentation

Answers

Option A and C are correct. The analyst should use copy and paste or embed the graphic inside the presentation to update it without changing the original file.

Tables or graphs that display your data are called visualizations. Visualizations are generated for you automatically when you prepare a report in the Results area, but you may always add more. Although the options and settings for each visualization vary, there are some fundamental guidelines that apply to all or the majority of visualization kinds, which we will go over on this page.

By choosing the correct icon under the Visualization section, you can modify the visualization. You may find out the name by hovering over the icon. The current type of a visualization will be highlighted in blue.

The source of the data that your visualization will use is known as a data source. These sources may consist of the survey questions you asked as well as extra fields like embedded data and survey metadata.

To know more about visualization click here:

https://brainly.com/question/29430258

#SPJ4

a router is performing basic routing functions. what is the first step in the transmission of a packet? 1 point the router examines the destination ip of this packet. check the routing table. a router receives a packet of data. sent an arp response.

Answers

The router looks up the destination network in its routing table; In the third step, the router looks up the destination network of the IP address in its routing table.

What is IP address?

IP address stands for "Internet Protocol address". The Internet Protocol is a set of rules that govern internet communication, such as sending email, streaming video, or connecting to a website. An IP address is a unique identifier for an internet network or device.

The internet protocols manage the process of assigning an IP address to each unique device. (Internet protocols also perform other functions, such as routing internet traffic.) This makes it simple to see which internet devices are sending, requesting, and receiving data.

To know more about IP address, visit: https://brainly.com/question/29734424

#SPJ4

Using technology, calculate the line of best fit. Identify and interpret the slope in this scenario. The slope of the line of best fit is 0. 25. Each time the shoe size increases by one, the height increases by 0. 25 inches. The slope of the line of best fit is 0. 25. Each time the shoe size increases by 0. 25, the height increases by one inch. The slope of the line of best fit is 66. 6. Each time the shoe size increases by one, the height increases by 66. 6 inches. The slope of the line of best fit is 66. 6. Each time the shoe size increases by 66. 6, the height increases by one inch.

Answers

According to the scatter plot, the slope in this case means that: The slope of the line of best fit is 0.25. The height rises by 0.25 inches for each shoe size increase of one.

What is scatter plot?

A scatter plot, also known as a scattergraph, scatter chart, scattergram, or scatter diagram, is a type of mathematical diagram that uses Cartesian coordinates to display values for typically two variables for a set of data.

An additional variable can be shown if the points are color-, shape-, or size-coded. The information is represented as a set of points, where each point's position on the horizontal axis and vertical axis is determined by the values of two variables.

A scatter plot can be used when both the continuous variables are independent of one another or when one continuous variable is controlled by the experimenter and the other depends on it.

Learn more about scatter plot

https://brainly.com/question/6592115

#SPJ1

Which of the following database model choices would be best for storing video clips organized by various vacations you have taken?
Hierarchical
Flat-file
Network
Object-oriented

Answers

The best database model options for organizing video clips into playlists based on the numerous vacations you've taken are object-oriented.

How do databases work?

A database is a structured collection of data that is electronically accessible and stored. Big data are housed on multiple computers or cloud storage, whilst small database can be kept on a system files. Data modelling, effective data presentation and storage, programming languages, privacy and security of sensitive data, and cloud control issues, such as providing access control and fault tolerance, are all part of the design of database.
Databases have one of two basic forms :
1)single-file or flat file database
2)multi-file relational or structured database

To know more about Database
https://brainly.com/question/29412324
#SPJ4

a company hires security experts to play the role of hackers. the experts are asked to attempt to breach the infrastructure to determine how secure the company is from threats. the experts are also asked to recommend improvements. what is this activity called?

Answers

Since the company hires security experts to play the role of hackers. the experts are asked to attempt to breach the infrastructure to determine how secure the company is from threats. the experts are also asked to recommend improvements. This activity is called  penetration testing.

What is the use of penetration testing?

Penetration testing, also known as ethical hacking or pen testing, is the authorized simulation of a cyberattack on a computer system that is carried out to examine the system's security. This is distinct from vulnerability assessments.

Therefore, Penetration testing, often known as pen testing, is seen as a form of a security exercise where a cyber-security specialist looks for and attempts to attack weaknesses in a computer system. By simulating an attack, it is possible to find any security gaps that an attacker might exploit.

Learn more about penetration testing from

https://brainly.com/question/26555003
#SPJ1

*Write a program that prompts the user to enter the total number of students first. *Then ask the user to input each student’s grade and use loop statements to read in each grade. Check input grade to make sure 0<=grade<=100, if the user input any other number, print out warning message and ask the user to input a new grade. *Display the highest score, the lowest score, and the average.Here is the sample run:Please input the total number of students: 10Please input the students’ grade: 56 23 89 45 96 -45Grade must between 0 and 100.Please input another score: 45 12 85 74 65The highest grade is: 96The lowest grade is: 12The average grade is: 59Note: You do not need to use array to save each input score for this lab. A Single loop to read in each grade, compare with the current highest grade, lowest grade, and calculate the running sum at the same time.(Java)

Answers

Using knowledge in computational language in python it is possible to write a code that  prompts the user to enter the total number of students first. *Then ask the user to input each student’s grade and use loop statements.

Writting the code:

#calculating Average

   def calc_average(scores):

           return sum(scores)/len(scores)

   grade_dist = {

   (90, 101):'A',

   (80,90):'B',

   (70, 80):'C',

   (59, 70):'D',

   (0,59):'F'

   }

   def get_grade_freq(scores):

       grades = {'A':0, 'B':0, 'C':0, 'D':0, 'F':0}

       for score in scores:

         for k, v in grade_dist.items():

           if score in range(k[0], k[1]):

             grades[v]+=1

       print("Grade distributions")

       for grade, number in grades.items():

           print("Number of {}’s = {}".format(grade, number))

   def get_scores(n):

       scores = []

       cond = True

       while cond and n>0:

         score = int(input("Enter an exam score between 0 and 100 or -1 to end : "))

         if score==-1:

           cond=False

           return -1

         if score not in range(0,101):

             print("Sorry, {} is not in the range of 0 and 100 or -1. Try Again!".format(score))

         if score in range(0,101):

           scores.append(score)

           n-=1

       return scores

   def main():

       n = int(input('total number of exams ' ))

       scores = get_scores(n)

       if scores == -1:

           exit(-1)

       average = calc_average(scores)

       print("You entered {} valid exam scores with an average of {}.".format(n, average))

       get_grade_freq(scores)

   if __name__=='__main__':

       main()

See more about python at brainly.com/question/12975450

#SPJ1

[10 pts] how do you have to set up the control signals to transfer a numeric value from the main memory (ram) to the accumulator register on the brainless microprocessor?

Answers

STEPS :

To transfer a numeric value from the main memory (RAM) to the accumulator register on the brainless microprocessor, the appropriate control signals must be set up as follows:

1. Set the memory address register to the address of the numeric value in RAM.

2. Set the memory data register to the numeric value.

3. Set the memory read signal high.

4. Set the memory write signal low.

5. Set the accumulator write signal high.

6. Set the accumulator read signal low.

7. Set the accumulator address to the address of the accumulator register.

8. Clock the memory and accumulator control signals.

To know more about RAM
https://brainly.com/question/11411472
#SPJ1

Assume that the instruction pointer, EIP, initially contains 8510 and the assembly language representation of the instructions in memory starting at address 8510 is Instruction Address Instruction 85 SUB AL, Ox33 86.. JMP 242 Before the instruction sequence is executed, the flags are CF=1, ZF=0 and SF=0 and the Registers have the values AL=0x33, BL=0x4D CL=0xBE and DL=0x3C. What is the value of the instruction pointer after the sequence executes?

Answers

The number of televisions per capital is calculated by dividing the number of television sets by the total US population. In this case, we divide the 285 million television sets by the population of 298.4 million.

What is use of televisison?

This gives a result of 0.9551 televisions per capita. Note that this method (dividing the number by the population) also is used for calculating the per capita of many other things like GDP.

In this case, we divide the 285 million television sets by the population of 298.4 million. This gives a result of 0.9551 televisions per capita.

Therefore, The number of televisions per capital is calculated by dividing the number of television sets by the total US population. In this case, we divide the 285 million television sets by the population of 298.4 million.

Learn more about television on:

brainly.com/question/16925988

#SPJ1

consider the following constructor, which is intended to assign the parameter x to an instance variable also named x. what changes can be made for the code to work as intended?

Answers

The instance variable population could be returned instead of p, which is local to the constructor.

What is a constructor?

A constructor, in object-oriented programming, is a special method of a class or structure that initializes a newly created object of that type. A constructor call is made automatically each time an object is created.

Similar to an instance method, a constructor can be used to set an object's members to default or user-defined values. It typically has the same name as the class.

Since a constructor lacks a return type, despite looking similar, it is not a valid method. The constructor initializes the object, not running code to perform a task, and it is not allowed to be static, final, abstract, or synchronized.

Learn more about constructor

https://brainly.com/question/29692747

#SPJ1

you are trying to push a memory module into a memory slot, but it is not seating properly. what is the most likely issue?

Answers

Assuming you are trying to push a memory module into a memory slot, but it is not seating properly, the most likely issue would be that: A) you are trying to install the memory module backwards in the memory slot.

What are the types of computer memory?

In Computer technology, there are two (2) main types of memory or storage location for software program (application) that are being used on a computer and these include the following;

Read only memory (ROM).Random access memory (RAM).What is RAM?

In Computer technology, RAM is an abbreviation for random access memory and it also referred to as a memory module or main memory. RAM can be defined as a volatile and temporary storage (memory) location that is used for currently opened software program (application) and computer data.

What is a memory?

A memory simply refers to a terminology that is used to describe the available space on an electronic device that is typically used for the storage of data or any computer related information such as the following:

VideosTextsMusicImagesCodesFolders

In conclusion, we can reasonably infer that a memory module would seat properly in a memory slot when it is installed in a backward.

Read more on memory here: brainly.com/question/24881756

#SPJ1

Complete Question:

You are trying to push a memory module into a memory slot, but it is not seating properly What is the MOST likely issue?

a)You are trying to install the memory module backwards in the memory slot.

b)You need to clear debris from the memory slot.

c)You need to push down the slot tabs and move them back.

d)You are trying to install a single-sided memory module in a double-sided slot.

Other Questions
when administering intravenous magnesium sulfate, the nurse will monitor for what signs and symptoms of hypermagnesemia? which enzyme is not a protector of the cell from reactive oxygen species (ross)? group of answer choices superoxide dismutase catalase all of these protect the cell from ross citrate synthase Line a passes through the points (5, 2) and (5, 5), while line b passes through (0, 4) and (5, 4). Which statement best describes the relationship between lines a and b?A. a and b are intersecting.B. a and b are parallel.C. a and b are collinear.D. a and b are perpendicular. putting warning labels on movies and music might actually backfire and lead children to be more drawn to them, a concept known as interest rates in the economy have fallen. how will this affect aggregate demand and equilibrium in the short run? group of answer choices aggregate demand will rise, the equilibrium price level will rise, and the equilibrium level of gdp will rise. aggregate demand will fall, the equilibrium price level will fall, and the equilibrium level of gdp will fall. aggregate demand will fall, the equilibrium price level will rise, and the equilibrium level of gdp will fall. aggregate demand will rise, the equilibrium price level will fall, and the equilibrium level of gdp will rise. Show that the Poisson bracket of two constants of the motion is itself a constant of the motion, even when the constants depend upon time explicitly. how does the texas democratic party platform respond to calls for barriers along the border? choices it Which of the following assets purchased in the current year are eligible to be expensed under Section 179 assuming the cost does NOT exceed the limitations? (Check all that apply.)Used equipmentLand for future building siteStorage warehouseNew office furnitureNew delivery truckApartment complex You pick up a ice cream andwich from the chool cafeteria and you tick it in your hoodie pocket o your worker. You run into your chem lab partner on your way to your eat and he tell you your homework i due next period. You forget all about your ice cream. Until you pull the platic full of muh oUt of your pocket later that afternoon. I thi a phyical or chemical change? Find the present value (the amount that should be invested now to accumulate the following amount) if the money is compounded as indicated.$6800 at 4% compounded quarterly for 3 years If the required reserve ratio is 10% and the fed conducts an open market purchase of $100, what is the maximum possible change in the money supply?. Generally accepted accounting principles do not allow variable costing to be used in external financial statements because absorption costing makes it easie financial statement users to interpret year-to-year changes in reported net income.True or False at 14-weeks gestation, a client arrives at the emergency center complaining of a dull pain in the right lower quadrant of her abdomen. the nurse obtains a blood sample and initiates an iv. thirty minutes after admission, the client reports feeling a sharp abdominal pain and a shoulder pain. assessment findings include diaphoresis, a heart rate of 120 beats/minute, and a blood pressure of 86/48. which action should the nurse implement next? Which ratio is equivalent to 3/151/33/51/515/3 What is the limit for intake of saturated fat recommended by the dietary guidelines for americans?. rodgers corporation produces and sells football equipment. on july 1, 20y1, rodgers issued $19,400,000 of 10-year, 11% bonds at a market (effective) interest rate of 9%, receiving cash of $21,923,488. interest on the bonds is payable semiannually on december 31 and june 30. the fiscal year of the company is the calendar year. required: for all journal entries, if an amount box does not require an entry, leave it blank. question content area 1. journalize the entry to record the amount of cash proceeds from the issuance of the bonds on july 1, 20y1. seeking to end luke lea's hold on state government, what group composed of lea's enemies held public meetings throughout the state to expose his malfeasance and demand justice? in a sample of 62 swim instructors, 37 said that the butterfly stroke is the most difficult to teach. find the critical value used to test a claim that a majority of swim instructors think that the butterfly is the most difficult stroke to teach at the 1% significance level. force on moving charges: an electron moves with a speed of 8.0 106 m/???? along the x-axis. it enters a region where there is a magnetic field of 2.5 T, directed at an angle of 60 to the x ????x???????? and lying in the xy p????????????????. calculate the magnitude of: the nurse is performing a history and physical on a client with diabetic nephropathy. findings include bp 124/80; smokes two packs of cigarettes/day; diet high in saturated fats and sodium. which intervention can help prevent the progression of the diabetic nephropathy?