Performing the mathematical operation

Assignment Help Business Management
Reference no: EM131267212

In Python

Part 1 : 40 pts Create a function that will take a file name as an argument. This function should open the file associated with that file name and read each line of that file. Each line should be appended to a list and the function should return that list. The list returned should have an element for each line of the file and that element should be the string that is at that line in the file.

Part 2 : 40 pts Create a function that will accept a list of strings. Each string in this list will contain a series of mathematical operations with numbers and operators separated by spaces. For example, "1 + 4 - 3". For each element of the list your code should split the string into each of it's parts and complete the mathematical operation for that string. It should then write the result of that operation to an output file. Each line of the output file should contain the result of performing the mathematical operation for the corresponding element of the list that was passed to this function. You may use the split() function to split each string into it's separate parts.

Part 3 : 20 pts Create a main function that will ask the user to input a file name. Pass that file name to the first function of this assignment. Pass the value that is returned from the first function into the second function. Don't forget to call main at the end of your program

Notes: You should turn in only one file. The input file that I will use to test your program will contain a string that follows the format described in part two on each line of that file. You will not have to check that the input is valid.

Reference no: EM131267212

Questions Cloud

Why big data has become a hot topic in the business world : Read the article Big Data basic concepts and benefits explained. Focus on why this has become a hot topic in the business world. Describe why big data has become a hot topic in the business world.
Providing a stable and social environment for the employees : To Increase customer satisfaction by providing training center for our employees to develop their skills and abilities hence, their communication and interpersonal skills will improve the customer satisfaction.
Political unrest in russia : "Regarding recent revolutions in the Arab world and the political unrest in Russia, what role has social media played? How can governments benefit from its citizens use of social media during times of civil unrest?"
Explain how are two types of operating systems similar : What are the differences between a Windows operating system and a Linux operating system? What inherent security controls are included with each operating system? How are the two types of operating systems similar?
Performing the mathematical operation : Each line of the output file should contain the result of performing the mathematical operation for the corresponding element of the list that was passed to this function. You may use the split() function to split each string into it's separate pa..
How the ama code of ethics relates to the issue : What should Jane do? Why?  -  What does the AMA Code of Ethics say about accuracy in promotional materials?
How new technology is provided for foreign countries : Explain how the WHO, GHDx, and the World Health Summit are involved in world health, including information about how new technology is provided for foreign countries.
What is the minimum amount that you will accept today : What component of CEO pay do you think most aligns the interests of stockholders and CEOs? Explain. What is the minimum amount that you will accept today if you are to select the lump sum offer
Design a promotional message or theme : Define your promotional objectives. What specific results do you hope to accomplish, and which promotional tools will be responsible?

Reviews

Write a Review

 

Business Management Questions & Answers

  Strategic alliances among supply chain partnersevaluate the

strategic alliances among supply chain partnersevaluate the need for a strategic alliance among supply chain partners.

  Fundamental analysis studies supply and demand relationship

Write a 6000 words research paper on Commodity markets can be analyzed either technically or fundamentally. Fundamental analysis studies supply and demand relationships that define the price of a commodity at any given time.

  Identifies significant cultural beliefs, values and norms

Compare and contrast the selected country and the United States based on Hofstede's four cultural dimensions. You can research this information at the Hofstede Center by pasting into your browser: http://geert-hofstede.com/countries.html

  Customer satisfaction for prevention and non-acute services

Evaluate how need, demand, quality, and customer (patient) satisfaction for prevention and non-acute services are measured. How should these performance outcomes data be used in managerial decision making to improve patient care services

  Networking and personal developmenthow might you use your

networking and personal developmenthow might you use your network as a source for your own personal leadership

  Effects with a single click

1. The Illustrations group is found on the ________tab. 2. When you select a graphic, _________are found on the corners and sides. 3. In Excel, a(n) ___________ is a picture of any part of the screen in an open applic..

  Organizational systemic barriersanother barrier to change

organizational systemic barriersanother barrier to change which stems from the organizational structure design are the

  Interest grid in the analysis of stakeholders

Describes the use of the power/interest grid in the analysis of stakeholders and in the development of stakeholder management strategies.

  The united states office of personnel management salary

The salary structure and occupational families presented in the United States Office of Personnel Management Salary Table 2011-GS linked in the Resources. Notice how broad the bands are for individual jobs.

  Interpersonal communication skills in a customer-service

Interpersonal communication skills in a customer-service oriented field such as medical assisting are an important necessity within medical facilities. Describe in detail how customer-service is important as a receptionist, in the office and on the t..

  The expansion process

You are the Business Manager for TRE Aviation, Inc., an aircraft equipment and parts manufacturing company. The CEO is considering expanding operations overseas in several locations and has asked you to prepare an Executive Brief that provides a summ..

  Business leadership and business integration

Business Leadership and Business Integration

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