Program 1 Write a program that lets the user enter the total rainfall for each of 12 months into a list. The program should calculate and display the total rainfall for the year, the average (not...

I need help with Python homework. I don't have the time to complete all the assignments by the deadline.


Program 1 Write a program that lets the user enter the total rainfall for each of 12 months into a list. The program should calculate and display the total rainfall for the year, the average (not mean) monthly rainfall, and the highest and lowest amounts using list functions. Display the average monthly rainfall with 2 places to the right of the decimal point. The input prompts must be done using a loop and must match the following sample run (The monthly rainfall amounts will vary): Program 2 Write a world capital guessing game program by using a dictionary that contains the following information: County (key) Capital City (value) Mexico Mexico City United States Washington DC Spain Madrid Greece Athens Vietnam Hanoi Chile Santiago Peru Lima Kenya Nairobi Sudan Khartoum The program should iterate through the dictionary asking the user to enter the capital for each of the countries in the dictionary.  If the user inputs the correct capital, increment the number of correct by 1 and display a message exactly like the message in the sample program run.  If the user inputs the incorrect capital display a message exactly like the message in the sample program run. Here is a sample run of the program with correct and incorrect answers: After the program has iterated through the dictionary, the program should call a function named display_results.  The function should be passed one argument: the number of correct answers .  The function should display a message informing the user the number of correct capitals exactly like the message in the sample program run.  In addition, display one of the following messages based on the number of correct capitals: >= 8 - Your knowledge of world capitals is great!! >= 6 - Your knowledge of world capitals is above average! >=4 - Your knowledge of world capitals is average. < 4="" -="" you="" better="" study="" more!!!="" here="" is="" a="" sample="" run="" of="" the="" program="" with="" the="" ending="" messages="" based="" on="" the="" users="" input:="" program="" 3="" write="" a="" program="" that="" consists="" of="" one="" single="" line="" print="" statement="" which="" will="" print="" the="" following="" out="" exactly="" as="" shown ="" (hint:="" use="" the="" escape="" characters="" that="" are="" shown="" in="" table="" 6-1).="" program="" 4="" write="" a="" program="" that="" prompts="" the="" user="" to="" enter="" their="" first="" name,="" last="" name="" and="" phone="" number.="" from="" the="" input="" the="" program="" should="" generate="" a="" temporary="" password="" for="" the="" user. ="" the="" temporary="" password="" should="" include="" the="" following:="" ·="" first="" 2="" letters="" of="" the="" user's="" first="" name="" in="" lower="" case="" ·="" a="" hashtag="" (#)="" ·="" first="" 3="" letters="" of="" the="" user's="" last="" name,="" with="" the="" first="" two="" letters="" in="" lowercase="" and="" the="" last="" letter="" in="" uppercase.="" if="" the="" last="" name="" only="" includes="" 2="" letters,="" the="" last="" letter="" should="" be="" an="" uppercase="" z="" ·="" a="" hashtag="" (#)="" ·="" last="" 4="" digits="" of="" the="" user's="" phone="" number="" here="" is="" a="" sample="" run="" of="" the="" program:="" program="" 5="" write="" a="" program="" that="" generates="" and="" saves="" 10,000="" random="" numbers="" between="" 1="" and="" 10="" to="" a="" file.="" the="" program ="" should="" prompt="" the="" user="" for="" the="" file="" path="" and="" name="" of="" the="" file="" that="" the="" random="" numbers="" should="" be="" saved="" in="" using="" two="" prompts="" similar="" to="" the="" sample="" run="" of="" the="" program.="" display="" a="" message="" to="" the="" user="" after="" the="" random="" numbers="" have="" been="" written="" to="" the="" file="" successfully.="" here="" is="" a="" sample="" run="" of="" the="" program:="" program="" 6="" write="" a="" program ="" that="" does="" the="" following:="" opens="" the="" file="" containing="" the="" 10,000="" random="" numbers="" that="" was="" created="" by="" the="" code="" you="" wrote="" in="" part="" 1,="" reads="" the="" random="" numbers="" from="" the="" file="" and="" displays="" the="" number="" of="" times="" each="" number="" appears="" in="" the="" file. ="" prompt="" the="" user="" for="" the="" file="" path="" and="" name="" of="" the="" file="" that="" the="" random="" numbers="" should="" be="" saved="" in="" using="" two="" prompts="" similar="" to="" the="" sample="" run="" of="" the="" program. ="" here="" is="" a="" sample="" run="" of="" the="" program="" using="" the="" attached numbers.txt file:="" program="" 7="" update="" the weather.py file="" to="" do="" the="" following:="" ·="" using="" separate="" prompts,="" prompt="" the="" user="" to="" enter="" the="" latitude="" of="" the="" weather="" station="" and="" the="" longitude="" of="" the="" weather="" station="" ·="" use="" the="" latitude="" and="" longitude="" to="" retrieve="" the="" following="" information:="" ·="" station="" name="" ·="" current="" conditions="" eg.="" sunny,="" partly="" cloudy="" etc.="" ·="" temperature="" in="" fahrenheit="" ·="" elevation="" ·="" display="" the="" output="" as="" follows:="" the="" following="" are="" some="" urls="" with="" the="" latitude="" and="" longitude="" of="" weather="" stations="" to="" test="" your="" program:="" https://forecast.weather.gov/mapclick.php?lat="32.73016&lon=-117.19518" https://forecast.weather.gov/mapclick.php?lat="46.999&lon=-102.8833" https://forecast.weather.gov/mapclick.php?lat="31.7798&lon=-106.3763" https://forecast.weather.gov/mapclick.php?lat="44.0608&lon=-92.4831" https://forecast.weather.gov/mapclick.php?lat="30.4391&lon=-81.703" https://forecast.weather.gov/mapclick.php?lat="32.1259&lon=-81.297" program="" 8="" define="" a="" course="" base="" class="" with="" attributes="" number="" and="" title. ="" define="" a="" class="" offeredcourse="" that="" inherits="" from="" the="" course="" base="" class="" with="" the="" additional="" attributes="" instructor_name,="" term,="" and="" class_time.="" write="" the="" appropriate="" property="" decorators="" and="" setters="" for="" the="" data="" attributes="" of="" the="" course="" and="" offeredcourse="" classes.="" for="" guidance="" see="" slides="" 24="" and="" 25="" of="" the="" presentation="" and="" the="" example="" videos.="" save="" the="" two="" classes="" in="" a="" file="" named="" course_class.py="" and="" attach="" the="" course_class.py="" file.="" once="" you="" have="" written="" the="" classes,="" write="" a="" test="" program="" that="" creates="" an="" object="" of="" the="" course="" class="" and="" the="" offeredcourse="" class.="" prompt="" the="" user="" to="" enter="" data="" for="" each="" of="" the="" course's="" data="" attributes="" and="" the="" offeredcourse’s="" data="" attributes.="" store="" the="" data="" in="" the="" course="" and="" offeredcourse="" objects="" and="" then="" use="" the="" course="" and="" offeredcourse="" object’s="" property="" decorators="" to="" retrieve="" the="" data="" and="" display="" it="" on="" the="" screen.="" example="" of="" the="" tester="" program's="" input="" and="" output:="" program="" 9="" write="" a="" gui="" program="" that="" calculates="" an="" employee’s="" pay.="" the="" program’s="" window="" should="" have="" entry="" widgets="" that="" let="" the="" user="" enter="" the="" number="" of="" weekly="" hours="" worked="" (float="" data="" type),="" and="" the="" hourly="" pay="" rate="" (float="" data="" type)="" .="" when="" the="" calculate="" pay="" button="" is="" clicked,="" the="" program="" should="" display="" the="" employee's="" pay.="" if="" an="" employee="" works="" over="" 40="" hours="" in="" a="" week,="" the="" employee="" should="" get="" paid="" time="" and="" a="" half="" for="" the="" hours="" worked="" over="" 40. ="" the="" pay="" should="" be="" calculated="" based="" on="" the="" following="" algorithm:="" pay="hours" worked="" *="" pay="" rate="" if="" hours="" worked=""> 40.0      pay = pay  + ((hours worked - 40.0) * (pay rate * .5)) Your GUI should look like the following: The GUI must include a Quit button and the title must be updated. Program 10 Create a Python program named customer_database that calls 3 functions. The function named create_table creates and populates a table named Customer in a database called ABCCorp.  The table's structure should look like the following: Column names customer_number customer_name balance credit_limit rep_num Data type integer text real real integer Row 1 148 Al's Appliance and Sport 7550.0 7500.0 20 Row 2 174 Bargains Galore 3412.0 10000.0 65 Row 3 282 Brookings Direct 431.5 7500.0 35 Row 4 524 Kline's 12762.0 15000.0 35 Row 5 725 Deerfield's All Seasons 248.75 5,000.0 35 Row 6 842 Four Seasons 8221.0 8000.0 20 The five columns in the database should be customer_number, customer_name, balance, credit_limit and rep_num. After the six rows have been added, a function named update_table should be called that creates and runs SQL statements to do the following: · Bookings Direct credit limit has been increased to 12000.0, update the customer's credit limit. · Klines is no longer a customer, delete the customer from the table. · Bargain Galore's rep has changed, update their rep_num to 35.  After the updates have been completed, a function named query_table should be called that creates and runs the following queries: · A query to display all customer's names and credit limits for customers with a credit limit of 10000.0 or greater and a rep_num of 35. Order the results by credit limit in descending order. · A query to display all information for customers whose balance is greater than their credit limit.  The query results should be displayed as follows: Remember to commit any changes to the database after each statement that updates the data in the database. YOU MUST USE SQLite TO COMPLETE THIS ASSIGNMENT Program 11 Using the scatter method, write a program to plot the Natural Log of the numbers 1 through 200.  Your plot must include the following: · title · x-axis label · y-axis label · Your x-axis tick mark values must be formatted as whole numbers · You must explicitly set the axis limits to graph  · You can use any style other then seaborn-deep · You must apply a colormap to your natural log plot Program 12 Write a program that creates a Histogram visualization that shows the frequency of the number of runs scored by the Diamondbacks for each game in 2019 per the attached list of runs in each game. Copy and paste the list into your program. Your Histogram must include the following: · title · x-axis label · y-axis label · Values along the x and y-axis, showing the number of runs and the frequency that the number of runs were scored.  · Use list functions to determine the minimum and maximum number of runs the Diamondbacks scored in a game during 2019 to format your x-axis.  Do not hard code the minimum and maximum values in your program. Program 13 Write a program that reads and plots the high, low and closing stock prices found in the attached csv files: Amazon.csv Marriot.csv Netflix.csv United.csv Zoom.csv.   Your program should work for each of the attached stock .csv files  The plot should include the following: · The high, low and closing stock prices must be plotted using different colors.  The closing price plot should use a higher alpha value then the high and low price plots. · The plot must contain a title that includes the name of the stock and it must not be hard-coded.  Hint: the name of the stock is part of the file name, so you can use string slicing to get the name of the stock. · The y-axis and x-axis must include labels.  The y-axis labels must be formatted as currency. The x-axis labels must show the date.  The program  should prompt the user for the file path and name of the .csv file that contains the stock information.  It should be saved using two prompts similar to the sample run of the program.  Here is a sample run of the program for Amazon: Program 14 Write a program that reads and shows the location of the earthquakes found in the all_month.json file on a world map.  Since damage occurs to buildings when the earthquake's magnitude is >= 4.5 on the richter scale, only include earthquakes on the world map with a magnitude of 4.5 or greater and that occurred in the Western Hemisphere. The world map must include the following: · A title. · Markers that increase in size based on the magnitude and change in color based on the magnitude. · A color bar that shows the colorscale used.   · The markers must display hover text found in the title. · You must choose your own colorscale, do not use the colorscale that was used in the video example.  The colorscale should plot earthquakes with a higher magnitude in a darker color. The program  should prompt the user for the file path and name of the .json file that contains the earthquake information.
Jun 02, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here