Attached you will find a text file full of random numbers. There are 100 of them....
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Attached you will find a text file full of random numbers. There are 100 of them. Your goal is to create a program that reads in the numbers from the file into a Python list. It should then find the largest number in the array and write back out a file called "results.txt". Results should contain the number that was the highest as well as the line number that it was on in the file. Download numbers.txt Example Output The largest number was 123 which is found on line 731 33357 16666 40665 21639 59223 40952 16562 73933 48923 40261 3515 91004 83689 64710 88228 59685 67724 70206 79586 76869 96141 1333 61722 27668 94576 10672 28737 1610 21310 20733 38528 49524 2984 62803 53040 96431 98914 37290 72450 74361 84362 42312 40316 88424 8095 18040 M 18040 69376 98887 31948 36415 25219 17220 66602 52498 99066 6036 38497 82289 36773 19749 39459 84604 27418 79413 47777 77183 24156 88043 63836 31555 88777 94422 65134 4232 31302 92483 83243 39471 72903 16492 63646 63853 24282 53402 70289 77634 15666 94437 84435 57729 91822 28002 22348 2015 84286 28647 32269 51173 96186 44332 Attached you will find a text file full of random numbers. There are 100 of them. Your goal is to create a program that reads in the numbers from the file into a Python list. It should then find the largest number in the array and write back out a file called "results.txt". Results should contain the number that was the highest as well as the line number that it was on in the file. Download numbers.txt Example Output The largest number was 123 which is found on line 731 33357 16666 40665 21639 59223 40952 16562 73933 48923 40261 3515 91004 83689 64710 88228 59685 67724 70206 79586 76869 96141 1333 61722 27668 94576 10672 28737 1610 21310 20733 38528 49524 2984 62803 53040 96431 98914 37290 72450 74361 84362 42312 40316 88424 8095 18040 M 18040 69376 98887 31948 36415 25219 17220 66602 52498 99066 6036 38497 82289 36773 19749 39459 84604 27418 79413 47777 77183 24156 88043 63836 31555 88777 94422 65134 4232 31302 92483 83243 39471 72903 16492 63646 63853 24282 53402 70289 77634 15666 94437 84435 57729 91822 28002 22348 2015 84286 28647 32269 51173 96186 44332
Expert Answer:
Answer rating: 100% (QA)
example Python program that reads numbers from a file finds the largest number and its line n... View the full answer
Related Book For
Principles Of Managerial Finance
ISBN: 978-0136119463
13th Edition
Authors: Lawrence J. Gitman, Chad J. Zutter
Posted Date:
Students also viewed these programming questions
-
As newly appointed "Energy Czar," your goal is to reduce the total demand for residential heating fuel in your state. You must choose one of three legislative proposals designed to accomplish this...
-
Write a program that reads in the radius and length of a cylinder and computes the area and volume using the following formulas: area = radius * radius * volume = area * length Here is a sample run:
-
As newly appointed Energy Czar, your goal is to reduce the total demand for residential heating fuel in your state. You must choose one of three legislative proposals designed to accomplish this...
-
You have been asked to manage a $3 million university endowment fund, which is used to fund the additional salary stipend for 5 endowed chair positions. The stipend for each chair is $30,000 (for a...
-
Mah Company manufactures 2,000 staplers annually for its main product. The costs per stapler are as follows: Direct material ......$3.00 Direct labor ....... 8 Variable overhead ...... 4 Fixed...
-
How would I go about making a dequeue method given that we have _front _rear and _size variables as well as a linkedList to stare it in. assuming all test cases should pass public T dequeue() { //to...
-
Discuss the pros and cons of using social networks to recruit top talent.
-
On January 1, 2017, Prasad SpA had the following equity accounts. Share Capital-Ordinary (25 par value, 48,000 shares issued and outstanding)....1,200,000 Share...
-
New Tech Corporation has assets with a market value of $300 million, $40 million of which are cash. It has debt of $50 million, and 7 million shares outstanding. Assume perfect capital markets and no...
-
Henri of Henris French Cuisine (HFC), a chain of 12 restaurants, is trying to decide if it makes sense to outsource the purchasing function. Currently, Henri employs two buyers at an annual fixed...
-
Project S has a cost of $9,000 and is expected to produce benefits (cash flows) of $2,700 per year for 5 years. Project L costs $26,000 and is expected to produce cash flows of $7,100 per year for 5...
-
Select below the IMMEDIATE VALUE (imm) (3 or 5 hexadecimal digits) of the following instruction: Id x12,56(x2) 0038 0012 0008
-
How do you select the top ten rows of a two - dimensional numpy array? Group of answer choices array ( 1 - 1 0 ) array [ 0 : 1 0 , : ] array [ 0 : 9 , : ] array [ 0 : 9 , 0 : 9 ]
-
Browser-based applications OA) OB) C) OD) E) process queries without using SQL process queries using C++ can display only static content support graphical queries are thick-client applications
-
Determine the time complexity for the following function 1. function logAt Least10(n) { 32ENE 2. 3. 4. 5. } for (var i = 1; i
-
Analyze the running time of the following code fragment. You should provide justification for your answer. Giving only the big-Oh for the running time without any justification will not be considered...
-
Can you explain step by step on how would this would look like on Sage? Add your full name at the end of the company name. 2. Link account 3150 Retained Earnings to "Retained Earnings" in Sage 50....
-
Refer to the information from Exercise 22-19. Use the information to determine the (1) Weighted average contribution margin , (2) Break-even point in units, and (3) Number of units of each product...
-
In Table 3.5, most of the specific firms listed have current ratios that fall below the industry average. Why? The exception to this general pattern is Whole Foods Market, which competes at the very...
-
Describe the purpose of each of the four major financial statements.
-
Joan Messineo borrowed $15,000 at a 14% annual rate of interest to be repaid over 3 years. The loan is amortized into three equal, annual, end-of-year payments. a. Calculate the annual, end-of-year...
-
(a) Among 880 smart phones sold by a retailer, 72 required repairs under the warranty. Estimate the probability that a new phone, which has just been sold, will require repairs under the warranty....
-
A car rental agency has 19 compact cars and 12 intermediate-size cars. If four of the cars are randomly selected for a safety check, what is the probability of getting two of each kind?
-
With reference to Exercise 3.34, suppose that the questionnaire filled in by one of the 150 persons is to be double-checked. If it is chosen in such a way that each questionnaire has a probability of...
Study smarter with the SolutionInn App