1. Write a single Python statement that creates an empty dictionary named elements.2. Write a single Python statement that creates a dictionary containing the following key-value pairs: ‘x’ : 4 ‘y’ : 5 ‘z’ : 63. Assume the variable named elements references a dictionary. Write the complete Python if statement that determines whether the key ‘Carbon’ exists in the dictionary. If it does exist as a key, display the value that is associated with that key. Otherwise, display a message indicating so.4. Assume each of the variables named set1 and set2 references a set. Write Python code that creates another set containing only the elements that are found in both set1 and set2 and assign the resulting set to a variable named set3.5. Assume the following list exists: numbers = [1, 3, 5, 7, 9] Write a single Python statement that uses a dictionary comprehension to create a dictionary named sevens in which each element contains a number from the numbers list as its key and the product of the number times 7 as its value. In other words, the resulting dictionary should contain the following elements: {1: 7, 3: 21, 5: 35, 7: 49, 9: 63}Programming Exercise (50 points): Superbowl Winners Use the file named “SuperbowlWinners.txt” that is available on Blackboard in the same location as these instructions. The file contains the names of the teams that won the Super Bowl from 1967 through 2021. The first record in the file is the name of the team that won the Super Bowl in 1967. The second record is the name of the 1968 winner, etc. Write a Python program that reads this file and creates a dictionary in which the keys are the names of the teams and the value associated with each key is the number of times the team has won the Super Bowl. The program will also create a dictionary in which the keys are the years in which the Super Bowl was played, and each key’s associated value is the name of the team that won the Super Bowl that year. After creating both dictionaries, the program will prompt the user for a year in the range from 1967 through 2021. The program will then display the name of the team that won the Super Bowl that year and the total number of times that team has won the Super Bowl. Include a Python while loop that validates the year value entered by the user to ensure it is in the range from 1967 through 2021.Computer ScienceEngineering & TechnologyPython Programming
solved : 1. Write a single Python statement that creates an empty dic
How it works
- Paste your instructions in the instructions box. You can also attach an instructions file
- Select the writer category, deadline, education level and review the instructionsÂ
- Make a payment for the order to be assigned to a writer
- Â Download the paper after the writer uploads itÂ
Will the writer plagiarize my essay?
You will get a plagiarism-free paper and you can get an originality report upon request.
Is this service safe?
All the personal information is confidential and we have 100% safe payment methods. We also guarantee good grades
LET THE PROFESSIONALS WRITE YOUR PAPER!