Python Please! Create a program that will allow a user to do either of the following things: Get input from the user to write the following information to a file: Student name Assignment average grade Mid-term test grade Fi-nal project grade Fi-nal test grade Allow the user to search the file by student name and output a weighted average (15%, 25%, 25%, and 35%, respectively) based on the grades for that student in the file. The user should be able to choose either of the two options until they want to stop.
Q: A vehicle inspection station keeps records of its checking services in a text file (called…
A: Actually, python is a easiest programming language. It is a dynamically typed programming language.
Q: Ex: If the input of the program is: educate c the program opens the file educate.txt, which…
A: The synonym of a word can be denoted as another word that has the same meaning as the word. The code…
Q: PYTHON-Assume you have a file that has two columns separated by a comma. The first column contains…
A: 1.open file 2. Read file 3.Read it line by line 4.split the line by "," 5.make a dictionary and…
Q: 2. The manager of a basketball stadium wants you to write a program that calculates the total ticket…
A: The below program is written using C++ language and it can be compiled successfully.
Q: (Late Assignments will not be accepted for any reason) Counting the character occurrences in a file…
A: PROGRAM CODE: #include <stdio.h> #include <stdlib.h> //Function to print histogram…
Q: 1. Modify exampleSix to read file tooutfile2.txt compute and display the total; then write the total…
A: read file tooutfile2.txt compute and display the total; then write the total to a file named…
Q: Program a python program that demonstrates reading and comparing Create a python program…
A: According to the information given:- We have to follow the instruction to get the desired outcome.
Q: Write a program that allows the user to navigate the lines of text in a file. The program should…
A: Please Indent the code as shown in the screenshot below :
Q: Blood sugar is considered normal if its rate is Ines than 140 and greater than 70 , it is considered…
A: Given: Blood sugar is considered normal if its rate is Ines than 140 and greater than 70 , it is…
Q: num.txt is a file that contains a list of scores. num.txt 10 25 36 45 89 42 54 create a program that…
A: Solution- Programming language - Python All necessary comments are included in program code.…
Q: For this programming assignment I want you to write a program that calculates bigram frequencies for…
A: Hey there, I am writing the required solution based on the above given question. Please do find the…
Q: Create a program that will read an input file and write a report. Name the program in the format:…
A: def main():listNum = [] #open "decimalNumbers.txt" text file with object reference file, it will…
Q: Write a program that writes a series of random numbers to a file. Each random number should be in…
A: Random numbers are those which are generated randomly within some range. random module is imported…
Q: C++ A teacher is requiring her students to line up in alphabetical order, according to their first…
A: I will explain it in details,
Q: Write a program that inputs a text file. The program should print the unique words in the file in…
A: Python code: def sorted_unique_file(input_filename): input_file = open(input_filename, 'r') #…
Q: scores.txt : Jan,86 Drew,92 Blake,85 Alex,81 Taylor,88 Jordan ,72 Cam,89 The file scores.txt…
A: Hi. Let's move on to the code in the next step. I have included comments in the code that will…
Q: 12.7: Sentence Filter C++Write a program that asks the user for two file names. The first file will…
A: A C++ program for the given criteria is as follows, File name: “main.cpp” /* C++ Program to convert…
Q: Start a new program temp_file stats.py from your working version of read temp file.py. Comment out…
A: Python used to answer this question
Q: Program in Python: You are responsible for computing the votes of the election. We have 5…
A: To solution of given problem, we create a list of candidates. Then open the file in read mode, and…
Q: Q. Write a python program that creates an excel file containing Student Record: Roll No.,Name, Marks…
A: GIVEN: A python program that creates an excel file containing Student Record:Roll No.,Name, Marks…
Q: Using Python A file named data.txt contains an unknown number of lines, each consisting of a single…
A: The answer is as follows
Q: Program 5: Word Frequencies (Concordance) Use a text editor to create a text file (ex:…
A: Python Program to copy:- from os import pathimport sysdef fileExists(fileName):…
Q: *Code in Python A file concordance tracks the unique words in a file and their frequencies.…
A:
Q: (19) A file named "Fruit.txt" contains unknown number of fruit (maximum number of fruit is 50). Each…
A: #include <iostream>#include <fstream>#define size 100using namespace std;int main(int…
Q: Instructions concordance.py concordance.py example.txt + 1 # Put your code 1 I AM SAM I AM SAM SAM I…
A: Given: A file concordance tracks the unique words in a file and their frequencies. Write a program…
Q: A group of 30 people have gone apple picking at Battleview Orchards. Each person has picked a number…
A: Answer: C++ Source Code: #include <iostream>#include <fstream> using namespace std; int…
Q: A vehicle inspection station keeps records of its checking services in a text file (called…
A: Actually, python is a easiest programming language. It is a dynamically typed programming language.
Q: scores.txt : Jan,86 Drew,92 Blake,85 Alex,81 Taylor,88 Jordan ,72 Cam,89 Note: code is written…
A: The answer for the above given question is given blow:
Q: Write a program that displays the cost of different options at a vending machine. Your program must:…
A: ifstream is a stream used for file reading ofstream is a stream used for file writing
Q: PYTHON: I need to get the avg statement out of the loop so that the output prints correctly. Any…
A: Required Python code with sample required Output given below
Q: What does the following python code do? f = open("sample.txt", "w") Choose all that apply.…
A: We use the open () function in python to the open a file in read or write mode The 'w' specific is…
Q: YTHON!!!! Write a program that allows the user to navigate the lines of text in a file. The program…
A: Actually, python is a easiest programming language. It is a dynamically typed programming language.…
Q: Use C++ to read data from a text file and create an array of numbers. Use the C++ 'fstream' library…
A: Actually, array is a collection of elements.
Q: A vehicle inspection station keeps records of its checking services in a text "inspection.txt").…
A: Below is the implementation:-
Q: The following table that is available in a file “rain.txt" shows the amount of rain in mm³ that fell…
A: Why files are needed? When a program is terminated, the entire data is lost. Storing in a file will…
Q: The course records are shown below: Each student has 4 assignments. 108194 9…
A: C++ Code: #include <iostream>#include <fstream>#include <cstdlib>#include…
Q: e by calling the appropriate method of the Volume object which changes the value of the Volume. The…
A: Please use Python for this question. Please format code properly when answering the question.…
Q: Question 4 14 Points Suppose you have a file called "MyData.txt". In this file, a list of unknown…
A: The program in C++ is: #include <fstream> #include<iostream> using namespace std; int…
Q: All I need is the main.cpp file Programming Specifications: Task: Two files have been provided…
A: Algorithm: Start the program. Read the data from the file wordcounter. Call the function and add…
Q: Modify this program so that it writes the values in two columns, like this: 32.ee 54.00 67.5e 29.00…
A: To write the values into two columns in the output file, the code can be modified as shown below.…
Q: ode in Python Write a program that inputs a text file. The program should print the unique words…
A: the program is an given below : #Prompt the user to enter the file name. file_name = input("Enter…
Q: Given a text file containing the availability of food items, write a program that reads the…
A: Here is the python code: See below step for code. Foot.txt
Q: Python, Write a program that prompts the user for a file name. (Use problem 2.txt file) Each line of…
A: Answer:
Q: 2. This involves a .txt file with one thousand rows of random numbers (between 1-1000) Using…
A: 1. File Input/OutputFile Input/Ouput (IO) requires 3 steps: Open the file for read or write or…
Q: The Directory.txt file contains names of the employees and their phone numbers in the following…
A: Required:
Q: In Python Write a program that consists of (at least) two function: A function that creates and…
A: Note: Follow Proper indentation as specified in snapshots. To implement the program, 4 methods are…
Q: Write python code to create a ‘Customers.txt’ file with at least one customer’s record. Write a…
A: Program Approach:- importing "CSV" library for CSV functions function to pay opening the…
Q: Write a program that reads the student information from a tab separated values (tsv) file. The…
A: The Answer start from step-2.
Q: PYTHON!!!!! A file concordance tracks the unique words in a file and their frequencies. Write a…
A: file = open(input("Enter the filename: ")) # Inputting the filename and opening it dictionary = {}#…
Q: Create a source code text file and save it as named text.txt. Write a program that reads the file's…
A: According to the asked question, the solution is given below with a proper explanation.
Python Please!
Create a
- Get input from the user to write the following information to a file:
- Student name
- Assignment average grade
- Mid-term test grade
- Fi-nal project grade
- Fi-nal test grade
- Allow the user to search the file by student name and output a weighted average (15%, 25%, 25%, and 35%, respectively) based on the grades for that student in the file.
The user should be able to choose either of the two options until they want to stop.
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 3 images
- Create a python code i. Add a function named readfile() to your program that takes a string (filename) as the parameter. You can assume that this file contains a single string. Your function must read the file and return this string. ii. Add a function named scramble() that takes a string parameter (e.g., x). You can assume that x has even length. This function must create two strings such that the first string (e.g., y) is composed of all even numbered characters in x and the second string (e.g., z) is composed of all odd numbered characters in x. For example, if x = "abcdefgh" then y is "aceg" and z is "bdfh". Your function must return these strings (e.g., y and z). iii. Add a function named writefile() to your program that takes three strings as parameter, a filename and two scrambled strings (e.g., y and z), in this order. You function must write these strings y and z on separate lines in the file. This function does not return anything. Docstrings and comments are not necessary.For an e-Shop, there is a Customer whose data is stored in a file ‘Customers.txt’, where ID, Name, Phone, Address, Email and AmountBalance. When the customer buys a product and pays from his AmountBalance, the system checks his balance and deducts if enough amount is there. Otherwise the customer receives a message “You don’t have sufficient Balance in your wallet”. Write python code to create a ‘Customers.txt’ file with at least one customer’s record. Write a function pay(), that takes amount as an input, reads the file and gets AmountBalance, print “Successful Transaction” when payment can be made or a message “You don’t have sufficient Balance in your wallet”. Write a function checkBalance(), that reads the file and gets AmountBalance, prints “Amaount Balance” Write a function recharge(), that takes “Enter Amount you want to recharge”, reads the file and gets AmountBalance, adds the new amount in AmountBalance, update the file and prints “Success”The course records are shown below: Each student has 4 assignments. 108194 9 10 10 10 197526 10 10 10 10 197008 10 10 0 10 197746 10 10 9 10 108154 10 0 10 9 Create an input file ‘CSassignments.txt’ using an editor such as Notepad++ with a student number, then a space, then four assignment marks on one line. The assignment marks are whole numbers and are separated by a space. Your C++ program will read from the file ‘CSassignments.txt’ and write to a second file ‘CSgrades.txt’ which includes the average of the student’s four assignments. e.g. 108194 9 10 10 10 9.75 Your C++ program should work with any number of records in the ‘CSassignments.txt’ input file – that is – test your program with TWO records…
- scores.txt : Jan,86 Drew,92 Blake,85 Alex,81 Taylor,88 Jordan ,72Cam,89 The file scores.txt (attached) contains a list of names and test scores. Create a program that reads each line of the file and determines the highest score and who obtained it. This is an exercise in strings. You are required to use at least one string method to determine the names and the scores. Your output should resemble the following: Highest Score: 100Achieved by: Jay Note; i could not send an attachment of the actual file but i have copied its contents.Through this programming assignment, the students will learn to do the following: Practice processing command line arguments. Perform basic file I/O. Use structs, pointers, and strings. Use dynamic memory. This assignment asks you to sort the letters in an input file and print the sorted letters to an output file (or standard output) which will be the solution. Your program, called codesolve, will take the following command line arguments: % codesolve [-o output_file_name] input_file_name Read the letters in from the input file and convert them to upper case if they are not already in uppercase. If the output_file_name is given with the -o option, the program will output the sorted letters to the given output file; otherwise, the output shall be to standard output. In addition to parsing and processing the command line arguments, your program needs to do the following: You need to construct a doubly linked list as you read from input. Each node in the list will link to the one in…The objective of this question is to generate and read files that contain a list of random numbers. Write a function that generates a file with following parameters: def fillFile(fileSize, fileName): The function should be called to generate files in the following sizes: fileSizes = [1000, 5000, 10000, 20000, 30000, 40000, 50000] The generated files can have names file1000, file 5000, file 10000, file20000, fi130000, file40000, file 50000. You can use random.randint(0.fileSize+1000) to generate a random number. Write another function that reads numbers inside of a file and returns a list. def readFile(fileName): The returned list contains the numbers stored in the file. At each call of fillFile and readFile, record the times before and after the function call as in following example (import time): start = time.time() fillFile(file Size, "file" + str(fileSize)) finish time.time() runTime = finish - start Record the run times of functions into a file named "fileStats.txt". The…
- Directions: Use a file city.txt for answering the questions that follow each scheduling algorithm. This file has three columns (comma separated): the first column contains the job Id, the second column indicates the CPU burst, and column three is the arrival time of the corresponding job. Parallel Programming It is vaccine season! COVID19 vaccines are out, and everyone is rushing to get one. Vaccines are available from six different brands and you have been entrusted to write a program to count the total number of vaccines of each brand administered across 21 cities in the state. Write a multithreaded program (in the file vaccines.cpp) that counts the number of vaccines in 21 different files of numbers. Each line in each of the files will contain either one of the following brand names: v1, v2, v3. Your program must count the number of units for each vaccine brand administered, across all 21 cities, and display the total number of units for each brand. The files are named…PYTHON!!!! Write a program that inputs a text file. The program should print the unique words in the file in alphabetical order. Uppercase words should take precedence over lowercase words. For example, 'Z' comes before 'a'. The input file can contain one or more sentences, or be a multiline list of words. An example input file is shown below: example.txt the quick brown fox jumps over the lazy dog An example of the program's output is shown below: Enter the input file name: example.txt brown dog fox jumps lazy over quick the Create and populate your own text file for development. Program produces correct output for given input, test 1: Test Case: Program output test 1 Input: test.txt Results: alike ancient blood both break civil dignity fair fatal foes forth from grudge hands households in lay loins makes mutiny new of our scene the these to two unclean verona we where Program produces correct output for given input, test 2 Test Case: Program output test…The function print_last_line in python takes one parameter, fname, the name of a text file. The function should open the file for reading, read the lines of the file until it reaches the end, print out the last line in the file, report the number of lines contained in the file, and close the file. Hint: Use a for loop to iterate over the lines and accumulate the count. For example: Test Result print_last_line("wordlist1.txt") maudlin The file has 5 lines.
- Consider a file named transaction.txt which contains unknown number of lines. Each line contains data of one transaction as follows: username (string), amount (float), and membership number (int). Write a C++ program that reads the data from the file, then displays on screen the number of users, the total amount, the average of amounts, the lowest amount and the highest amount. Reading from the file should stop when one or more of the conditions given below becomes true:(a) The end of file has been reached. (b) The “user999” is reached.Consider a file named transaction.txt which contains unknown number of lines. Each line contains data of one transaction as follows: username (string), amount (float), and membership number (int). Write a C++ program that reads the data from the file, then displays on screen the number of users, the total amount, the average of amounts, the lowest amount and the highest amount. Reading from the file should stop when one or more of the conditions given below becomes true:(a) The end of file has been reached. (b) The “user999” is reached.transaction.txtHassan 12.5 12345 Mariam 5.2 87542 Zahra 33.1 93568 :::: ::Sample Screen OutputNumber of users: 54 Transactions total amount: 2658.7 The average of amounts: 120 The highest amount: 280 The lowest amount: 5.2Make the following modifications for the solution above: name the output/input file "myRandomNumbers.txt" use a loop to output 17 random numbers to the file after creating the file, close it open the file for input and read the contents and then total the numbers in the file determine the average of the numbers in the file determine the highest and lowest numbers in the file DO NOT USE PYTHON BUILTIN FUNCTIONS TO CALCULATE THE AVERAGE OR THE HIGHEST AND LOWEST NUMBERS an expected number of modules/functions would be in the 5-8 range Display your results: the numbers generated on a single horizontal line the calculated total and average the highest and lowest number in the file Be sure to use clear prompts/labeling for input and output.