Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Must be done in python and using linux mint Write a program to create a text file which contains a sequence of test scores. Each

Must be done in python and using linux mint

image text in transcribedimage text in transcribed

Write a program to create a text file which contains a sequence of test scores. Each score will be between 0 and 100 inclusive. There will be one value per line, with no additional text in the file. Stop adding information to the file when the user enters -1 The program will first ask for a file name and then the scores. Use a sentinel of -1 to indicate the user has finished supplying data A sample session of this part might be Enter data file name: scoresl.txt Enter the scores, enter -1 to quit: Score: 100 Score: 79 Score: 67 Score: 32 Score: -1 After the above session the contents of scores1.txt would be 100 79 32 Create two or more files with test results Part 2: Write a program that will ask the user for a data file. You may use raw_input or a cs160gui method to allow the user to enter a file. Use one of the data files created from part 1. Each line of the file must contain a single value. Fill a list with the values from the file Once the list has been filled with values the program should display, with appropriate labels, the largest values from the list, the smallest value from the list, the average of the list (with 2 places after the decimal point). Then ask the user for a lower limit and an upper limit. Display all the values from the list that fall within that range. The numeric values must be right justified

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Marketing Database Analytics

Authors: Andrew D. Banasiewicz

1st Edition

0415657881, 978-0415657884

More Books

Students also viewed these Databases questions