Write a function that will accept a list as a parameter

Assignment Help Business Management
Reference no: EM131295990

Part 1: Write a function take a file name as a parameter. This function will open the given file for reading and then read each line of the input file and put each line into a list. If the user passes the name of a file that doesn't exist you should catch the exception that is thrown by the open() function and return an empty list. If a valid file name is passed this function will return the list that is created.

Part 2: Write a function that will take a list as a parameter. This list will be the list from the previous function. This function will take each element of that list and calculate the Quarterback rating for each QB in the list. You will want to use the float() function instead of the int() function to convert strings to numbers. For each line you will create a tuple where the first element of the tuple is the Quarterback's name and the second element is the quarterback's Passer rating. You will then place that tuple into a list. This function will return that list. The formula for Passer Rating is as follows:

Part 3: Write a function that will accept a list as a parameter. This list will be the list from the previous function. This function will use the selection sort algorithm that we used earlier in the semester to sort.

the list according to each quarterback's QB rating. This list will be sorted so that the highest QB rating is at the top instead of the lowest QB rating. Remember, you are sorting the tuples, not JUST the qb ratings. You should end up with a list of tuples that is sorted by QB rating and each tuple will have the name and rating for a quarterback. Remember, since lists are pass by reference you will not need to return the list from this function. Do NOT use built in sorting functions.

Reference no: EM131295990

Questions Cloud

Determining the company information asssets : In learning information security it is important to understand that threats to your company's information asssets are present 24/7 and that there is never a time when a threat is not present.
Write a term paper comparing the u.s. health care system : HCA302:write a term paper comparing the U.S. health care system to a country of your choice.
Write a full lab report presenting your results : Write a full lab report presenting your results and conclusions using the same guidelines for writing lab reports that you used in Chem 101L. These guidelines can be found at the websites below.
Mixture of alphabetic characters and numbers : Write a program in Visual Basic to display 1000 8-character random user IDs in a text box after you click a button.  Make sure the program verifies that none of the IDs are identical. Each userid should include a mixture of alphabetic characters a..
Write a function that will accept a list as a parameter : Write a function that will accept a list as a parameter. This list will be the list from the previous function. This function will use the selection sort algorithm that we used earlier in the semester to sort.
Was there filling of the fire compartment by smoke : Was there filling of the fire compartment by smoke? What was the smoke flow from the compartment regarding any opening? What was the smoke movement?
Propose a detailed plan that focuses on password policies : Propose a detailed plan that focuses on password policies and authentication methods to protect the project from becoming public during the research and development phase.
Security is of utmost importance for businesses : Security is of utmost importance for businesses. The implementation of security procedures for both wired and wireless devices and use of firewalls are two ways that businesses combat internal and external security threats.
Provide a summary of your learning style : Provide a summary of your learning style.List your preferred learning strategies.Compare your preferred learning strategies to the identified strategies for your preferred learning style.Discuss how the awareness of individual learning styles, prefe..

Reviews

Write a Review

Business Management Questions & Answers

  Caselet on michael porter’s value chain management

The assignment in management is a two part assignment dealing 1.Theory of function of management. 2. Operations and Controlling.

  Mountain man brewing company

Mountain Man Brewing, a family owned business where Chris Prangel, the son of the president joins. Due to increase in the preference for light beer drinkers, Chris Prangel wants to introduce light beer version in Mountain Man. An analysis into the la..

  Mountain man brewing company

Mountain Man Brewing, a family owned business where Chris Prangel, the son of the president joins. An analysis into the launch of Mountain Man Light over the present Mountain Man Lager.

  Analysis of the case using the doing ethics technique

Analysis of the case using the Doing Ethics Technique (DET). Analysis of the ethical issue(s) from the perspective of an ICT professional, using the ACS Code of  Conduct and properly relating clauses from the ACS Code of Conduct to the ethical issue.

  Affiliations and partnerships

Affiliations and partnerships are frequently used to reach a larger local audience? Which options stand to avail for the Hotel manager and what problems do these pose.

  Innovation-friendly regulations

What influence (if any) can organizations exercise to encourage ‘innovation-friendly' regulations?

  Effect of regional and corporate cultural issues

Present your findings as a group powerpoint with an audio file. In addition individually write up your own conclusions as to the effects of regional cultural issues on the corporate organisational culture of this multinational company as it conducts ..

  Structure of business plan

This assignment shows a structure of business plan. The task is to write a business plane about a Diet Shop.

  Identify the purposes of different types of organisations

Identify the purposes of different types of organisations.

  Entrepreneur case study for analysis

Entrepreneur Case Study for Analysis. Analyze Robin Wolaner's suitability to be an entrepreneur

  Forecasting and business analysis

This problem requires you to apply your cross-sectional analysis skills to a real cross-sectional data set with the goal of answering a specific research question.

  Educational instructional leadership

Prepare a major handout on the key principles of instructional leadership

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd