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

  Potential influences of power and politics

Write a summary in which you critically discuss the potential influences of power and politics that can affect your scenario organisation.

  What has been the effect of aggressive competitor pricing

Comment on the impact of the more highly aggressive pricing strategies used by competitors. What has been the effect of aggressive competitor pricing on your results (profitability, market share, cost to consumer, etc.)

  Foundations and challenges in strategic management

foundations and challenges in strategic management walmartin a narrative format discuss walmart from a strategic

  People in various areas of the operation

Ron Garcia felt good about his first week as a management trainee at Mexicana Wire Winding, Inc. He had not yet developed any technical knowledge about the manufacturing process, but he had toured the entire facility, located in the suburbs of Mex..

  Analyse success or failure of applied project management

Analyse the success or failure of the applied project management framework, principles, processes and / or practices.

  Describe how marketers attempt to use opinion leaders

How do the elements of culture that influence buyer behavior work in your country or region? Which ones are the most dominant?

  The short paper activity for this module entails

The short paper activity for this module entails the creation of a specific business communication message. For this assignment, write a brief proposal in letter format to Doneta Zach, fleet manager for Midwest Express, 338 S.W. 6th, Des Moines, Iowa..

  Forming an entity five friends in a home building

forming an entity five friends in a home building businessfive friends have gotten together to form a home building

  Suppose that real gdp per capita of the united states

Suppose that real GDP per capita of the United States is $32,000 and its growth rate is 2% per year. Real GDP per capita of China is $4,000, and its annual growth rate is 7%. Look at the scenario Growth Rates. According to the rule of 70, how larg..

  Evaluate the pros and cons of a force ranking

Examine ways in which a forced ranking system could be leveraged to support a performance improvement initiative.

  Explain dad promises junior that he will send him

Explain Dad promises Junior that he will send him on an expense-paid trip to Europe after his graduation if Junior spends at least five evenings a week studying in the campus library for the remainder of his senior year

  Explain oil multinational toward environmental protection

Guide the decisions of a large oil multinational toward environmental protection and influence the policies of a clothing company to outsourcing of manufacturing process.

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