Must be done in python and using linux mint


----------------------------Part1------------------------
filename = input('Enter file name : ')
# open file in write mode
fptr = open(filename, 'w')
print('Enter the scores, enter -1 to quit:')
# infinite loop
while True:
score = int(input(''))
if score == -1:
break
# write into the file
fptr.write(str(score) + '\n')
-----------------------------Part2------------------------------
filename = input('Enter file name : ')
# open file in read mode
fptr = open(filename, 'r')
# read the content of file
x = fptr.read()
arr = []
# read file line by line
for y in x.split('\n'):
arr.append( int( y ) )
largest = arr[0]
smallest = arr[0]
sum = arr[0]
for i in range( 1 , len(arr) ):
if arr[i] > largest:
largest = arr[i]
if arr[i] < smallest:
smallest = arr[i]
sum += arr[i]
average = sum / len(arr)
print('Largest Score :', largest)
print('Smallest Score :', smallest)
print('Average Score :', average)
l = int(input('\nEnter the lower limit: '))
u = int(input('Enter the upper limit: '))
for i in arr:
if i >= l and i <= u:
print(i)
--------------------------scores1.txt----------------------
100
79
67
32
79
85
97
41
Sample Output

Must be done in python and using linux mint Write a program to create a text...
NOTE: USE PYTHON CS160 Computer Science Lab 14 Working with lists, functions, and files Objective: Work with lists Work with lists in functions Work with files Assignment: Part 1: Write a program to create a text file which contains a sequence of test scores. Ask for scores until the user enters an empty value. This will require you to have the scores until the user enters -1. After the scores have been entered, ask the user to enter a file...
This will be done using Python in Linux Mint. The program should include a comment block at the top with your name, the program number, and the name of the course. (Make sure to have the file that does have the extension .py) How to run the file in Linux Mint? Open a command prompt (e.g. terminal) Make sure you are in the directory where your file is saved (e.g. type "cd ~/Desktop" if your file is on...
Python Programming Topics: list, file input/output You will write a program that allows the user to read grade data from a text file, view computed statistical values based on the data, and to save the computed statistics to a text file. You will use a list to store the data read in, and for computing the statistics. You must use functions. The data: The user has the option to load a data file. The data consists of integer values representing...
Topics: list, file input/output (Python) You will write a program that allows the user to read grade data from a text file, view computed statistical values based on the data, and to save the computed statistics to a text file. You will use a list to store the data read in, and for computing the statistics. You must use functions. The data: The user has the option to load a data file. The data consists of integer values representing student...
In this assignment, you will write a program in C++ which uses files and nested loops to create a file from the quiz grades entered by the user, then reads the grades from the file and calculates each student’s average grade and the average quiz grade for the class. Each student takes 6 quizzes (unknown number of students). Use a nested loop to write each student’s quiz grades to a file. Then read the data from the file in order...
Must be done in C# please! Thanks!
In this assignment you will create a program named Test Scores that displays the average of all tests; average midterm score; average final score; and displays the midterm or final score of a particular student. Create a class level two dimensional integer array named Grades initialized with the following data: 897 242 301 987 116 450 865 128 992 109 88 75 94 70 90 87 81 79 97 79 78 80 92...
CIS 22A C++ Project Exam Statistics Here is what your program will do: first it welcomes the user and displays the purpose of the program. It then prompts the user to enter the name of an input file (such as scores.txt). Assume the file contains the scores of the final exams; each score is preceded by a 5 characters student id. Create the input file: copy and paste the following data into a new text file named scores.txt DH232 89...
***This program is to be created using PyCharm Pro*** 1. Print “This program manipulates text from files and the clipboard and performs other string, file, and directory manipulation tasks.” 2. Output the current working directory of the program. 3. Ask the user to enter the directory where they would like files to be stored, make that directory, and store files in the program in that directory. 4. Write the following three lines to file_one.txt (without bullet points): • Line 1...
Following should be done in C++: Create a program that reads a text file and prints out the contents of the file but with all letters converted to uppercase. The name of the file to be read by the program will be provided by the user. Here are some example session: Contents of "data.txt": Hello, World! User input: data.txt Program output: HELLO, WORLD! Contents of "data.txt": tHiS FiLe HaS mIxEd CaSeS User input: data.txt Program output: THIS FILE HAS MIXED...
***This program is to be created using PyCharm Pro*** 1. Print “This program manipulates text from files and the clipboard and performs other string, file, and directory manipulation tasks.” 2. Output the current working directory of the program. 3. Ask the user to enter the directory where they would like files to be stored, make that directory, and store files in the program in that directory. 4. Write the following three lines to file_one.txt (without bullet points): • Line 1...