Name and Email Addresses
Write a
Want to see the full answer?
Check out a sample textbook solutionChapter 9 Solutions
Starting Out with Python (3rd Edition)
Additional Engineering Textbook Solutions
Modern Database Management (12th Edition)
Computer Science: An Overview (13th Edition) (What's New in Computer Science)
Starting out with Visual C# (4th Edition)
Digital Fundamentals (11th Edition)
Computer Systems: A Programmer's Perspective (3rd Edition)
Starting Out with C++ from Control Structures to Objects (9th Edition)
- Overview This program will have you use a loop to prompt a user for three foods and their country of origin and then store them in a dictionary called food_dict). Then, it will prompt the user for a dish that they like and then will tell them the country of origin. Expected Output Example 1 What is good to eat? Tacos What country is that from? Mexico What is good to eat? Pho What country is that from? Vietnam What is good to eat? Burgers What country is that from? America What dish do you like? Burgers Burgers is from America Example 2 What is good to eat? Pizza What country is that from? Italy What is good to eat? Spaghetti What country is that from? Italy What is good to eat? Gelato What country is that from? Italy What dish do you like? Pizza Pizza is from Italy Specifications • You should submit a single file called M4A2.py • It should follow the submission standards outlined here: Submission Standards • Your program should start by defining an empty dictionary called food_dict •…arrow_forwardPythonarrow_forwardProgram Specification For this assignment you will write a program to help people record the events of their day by supplying prompts and then saving their responses along with the question and the date to a file. Functional Requirements This program must contain the following features: Write a new entry - Show the user a random prompt (from a list that you create), and save their response, the prompt, and the date as an Entry. Display the journal - Iterate through all entries in the journal and display them to the screen. Save the journal to a file - Prompt the user for a filename and then save the current journal (the complete list of entries) to that file location. Load the journal from a file - Prompt the user for a filename and then load the journal (a complete list of entries) from that file. This should replace any entries currently stored the journal. Provide a menu that allows the user choose these options Your list of prompts must contain at least five different prompts.…arrow_forward
- Exercise: empty_dictionary Description In this exercise, your function will receive no parameters. It will create an empty dictionary and return it. Function Name empty_dictionary Parameters None Return Value An empty dictionary. Examples empty_dictionary() > 0)arrow_forwardData structures unique_values(a_dict:dict)-> dict This function will receive a single dictionary parameter known as a_dict. a_dict will contain a single letter as a string and numbers as values. This function is supposed to search a_dict to find all values that appear only once in the a_dict. The function will create another dictionary named to_ret. For all values that appear once in a_dict the function will add the value as a key in to_ret and set the value of the key to the key of the value in a_dict (swap the key-value pairs, since a_dict contains letters to numbers, to_ret will contain Numbers to Letters). Finally, the function should return to_ret. Example: a_dict: {'X': 2, 'Y': 5, 'N': 2, 'L': 2, 'W': 1, 'G': 0, 'R': 1} Expected: {5: 'Y', 0: 'G'} a_dict: {'Z': 3, 'P': 3, 'E': 2, 'G': 0, 'T': 5, 'L': 1, 'Q': 0} to_ret: {2: 'E', 5: 'T', 1: 'L'} a_dict: {'E': 3, 'X': 3} to_ret: {} a_dict: {'G': 3, 'D': 3, 'C': 4, 'Q': 1, 'H': 1, 'M': 2, 'Z': 1, 'W': 3} to_ret: {4: 'C', 2: 'M'}…arrow_forwardSimple login system PYTHON Create a static dictionary with a number of users and with the following values: First name Last name Email address Password Ask the user for: 5. Email address 6. Password Loop (for()) through the dictionary and if (if()) the user is found print the following: 7. Hello, first name last name you have successfully logged in 8. Notify the user if the password and email address are wrong 9. Additional challenge: if you want the program to keep asking for a username and password when the combination is wrong, you will need a while() loop.arrow_forward
- Overview This program will have you use a loop to prompt a user for three games and their systems and then store them in a dictionary called games_dict). Then it will ask the user for the worst game, delete that game, and print out the contents of the revised games_dict. Expected Output Example 1 What is a great game? Mario What system can I play that on? Nintendo What is a great game? Sonic I play that on? Sega What system can What is a great game? Spyro What system can I play that on? layStation That's too many, let's get rid of one What game should we remove? Sonic The new dictionary is: You can play Mario on Nintendo You can play Spyro on PlayStation Specifications • You should submit a single file called M4A3.py • It should follow the submission standards outlined here: Submission Standards • Your program should start by defining an empty dictionary called games_dict • It should populate games_dict using a for-loop • It should print out games_dict using a for-loop. Tips and Tricks…arrow_forwardA Dictionary object’s Remove method returns an integer indicating the number of elements that were removed. Question 48 options: True Falsearrow_forwardProgramming Language: C++ Create a structure Student and ask the user how many students. Create an array which will save the number of students in the input. Ask for the data of the first and last student and display them. Do not copy paste other codes from other site and use comments to understand it clearly.arrow_forward
- In Python, grades_dict = {'Wally': [87,96,70], 'Eva': [100,87,90], 'Sam': [94,77,90], 'Katie': [100,81,82], 'Bob': [83, 65, 85]} Ask user to enter the names of the rows, i.e., indices. You can use: len(grades) to get the number of rows of the DataFrame. In addition, using the sort_index() method, ask user whether they wish to sort by rows or by columns and whether to sort in ascending or descending order (do not use any if-else statements)arrow_forwardPython The program will create a quiz that will ask for the capital of a random state. Your program will repeat so that a total of 5 random states are presented to the user Write a program that creates a dictionary containing the U.S. states as keys, and their capitals asvalues. (Use the Internet to get a list of the states and their capitals.) The program should then randomly quiz the user by displaying the name of a state and asking the user to enter that state’s capital. The program should keep a count of the number of correct and incorrect responses. (As an alternative to the U.S. states, the program can use the names of countries and their capitals.)arrow_forwardCreate a static dictionary with a number of users and with the following values: First name Last name Email address Password Ask the user for: 5. Email address 6. Password Loop (for()) through the dictionary and if (if()) the user is found print the following: 7. Hello, first name last name you have successfully logged in 8. Notify the user if the password and email address are wrong 9. Additional challenge: if you want the program to keep asking for a username and password when the combination is wrong, you will need a while() loop. 10. Save the file as assignment03yourlastname.pyarrow_forward
- Programming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage LearningMicrosoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology Ptr
- EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTSystems ArchitectureComputer ScienceISBN:9781305080195Author:Stephen D. BurdPublisher:Cengage Learning