Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Read through all of the comments in this file and follow the directions exactly. 2. Your code's output must match the expected output from

1. Read through all of the comments in this file and follow the directions exactly. 2. Your code's output must match the expected output from each problem. 3. Original work only. Your work must be your own. 4. All code must contain comments to explain your logic. ## This problem covers the concepts of: ## 1. dictionaries ## 2. iteration using for loops ## ## Given the dictionary below, ## 1.append the key 'New York City Queens' and the value 'New York Mets', ## 2. Print out the contents of the ditcionary one key:value pair per row ## 4. Display all of the cities contained in the dictionary to the screen one item per row and ask a user to choose one city to delete and delete the dictionary entry ## 5. Test the dictionary to see if the delete was successful ## 5. Print out the contents of the ditcionary one key:value pair per row mlbTeams ={ 'Baltimore': 'Baltimore Orioles', 'Boston': 'Boston Red Sox', 'New York City Bronx': 'New York Yankees', 'St. Petersburg': 'Tampa Bay Rays', 'Toronto': 'Toronto Blue Jays', 'Chicago': 'Chicago Cubs', 'Cleveland': 'Cleveland Indians', 'Detroit': 'Detroit Tigers', 'Kansas City': 'Kansas City Royals', 'Minneapolis': 'Minnesota Twins', } ### Problem 1 Code goes here

## This problem convers the concepts of: ## 1. function definition ## 2. Passing variable to and from functions ## 3. fstrings ## ## Create code which ## 1. Asks a user to input a number ## 2. Take the number and pass it to a function called sqIt() ## 3. Within the function, square the number and return the value to the main program ## 4. Using an fstring, Printout the squared value to the screen as shown in the expected output """ Expected Output Please enter a number to square: 23 the numeber you entered was 23, and its square is 529 """ ### Problem 2 Code goes here

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Manga Guide To Databases

Authors: Mana Takahashi, Shoko Azuma, Co Ltd Trend

1st Edition

1593271905, 978-1593271909

More Books

Students also viewed these Databases questions