Write a python program to read salary of n employee ,employee name and salary as keyboard input, then save the records in a file salary.txt.(Each records will have a field for the employee name and salary) A program that reads the records from salary.txt file and display the details in tabular form and also display average score. Average (filkarams-salaDU NOTE : salary must be in between 500 and 10000 Employee Name Salary AAA 3300 SSs 990 GGG 886 HHH 5345 JJJ 4900 Average salary is . ...... ....... | OUTPUT SCREEN PROGRAM File salary.txt
Q: In Python Prompt the user for a text file that contains a list of student names, one on each line.…
A: NOTE: Follow proper indentation. sample data not given in the question. so, random data considered…
Q: Write a program to calculate the average of four integer score, and find the grade for 7 students.…
A: Required: Read scores from a txt file using c++ and print average and grade to a new text file.
Q: Run a python program that will receive a chemical compound formula as an input and will give its…
A: The mass.csv file is read using the csv module, which is imported in the code. The with statement is…
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: Three employees in a company are ups for a special pay increase. You are given a file;…
A: C++ programming provides classes for reading and writing files. The classes ifstream and ofstream…
Q: hree employees in a company are up for a special pay increase. You are given a file say…
A: import java.io.BufferedWriter; import java.io.File; import java.io.FileWriter; import…
Q: Write a program that uses the sizeof operator to determine the sizes in bytes of the various data…
A: Given that we have to make a program that has to print the size of datatype on screen and save that…
Q: Using matplotlib, a Python program that reads the contents of the file see attached then plots the…
A: Purpose of the solution: This program will generate a line chart whose data values will be obtained…
Q: Lab: Faculty Salaries 1. Create a data file, called salary.txt, with 100 lines. 2. Each line in…
A: Hey there, I am writing the required solution based on the above given question. Please do find the…
Q: Create a Python program that reads a text file containing 10 mailing addresses. The text file of…
A: Actually, python is a easiest programming language. It is a dynamically typed programming language.
Q: 3) The Table shown below lists the degrees of three students, Write a program in M-file to read…
A: Actually, database is a used to stores the data/information.
Q: Write a program to read and store four student’s car number and their distances, sort them into an…
A: Answer: For this problem, a class Student with instance variables id, car number and distance is…
Q: How do I write a python program that creates a text file to store scoring stats for the Tampa Bay…
A: Declare and initialize 3 arrays for holding names, goals, and assists of all the players. names =…
Q: In Python Take the Deck of cards we created in Problem Solving Exercise: Shuffle and Deal Cards and…
A: Note: we had provided answer according to given hints provided in solution parts.
Q: You are provided with an input file ("Data.txt") containing a number of text lines. Each line…
A: Required: please use spyder
Q: Write a program, which writes the even elements of an integer array to a file called…
A: Start Declare an array with values. Find the size of the array. for (i=0 : n ) do if(arr[i]%2==0) do…
Q: NEED HELP PLEASE! Write a Java program to read a text file (command line input for file name),…
A: import java.io.*; public class Test{ public static void main(String[] args) throws IOException {…
Q: 3. Write a java program that will parse the 13th digits Student ID only from a file. Student ID…
A: Below is the complete solution with sample Program and Output Images in detail for the given…
Q: The example of the two CSV files is attached below. One of the file is the crime database and the…
A: The program is written in python The sample files created are:
Q: Consider the file inputfile.txt which contains the following elements (numbers): 134, 325, 513, 726…
A: Python, like many other programming languages, offers file management and allows users to read and…
Q: Three employees in a company are ups for a special pay increase. You are given a file;…
A: #include <iostream>#include <fstream>#include <iomanip> using namespace std; int…
Q: Write a program to read the names in BoyNames.txt and GirNames.txt. Find the names that appear in…
A: Solution - Programming language name- Python All solution steps are included in program code. Store…
Q: Below this question is a generated text representing a DNA sequence. The first line starts with '>'…
A: The algorithm steps to write the given function gcContent(sequence) are given below:- First, count…
Q: in python Read a give “data.csv” file, analyze the data, write the analysis result to “report.txt”…
A: According to Bartleby rules, we are giving the answer of the first three subparts of the question…
Q: Write a program to read and store four student's name and their Salaries, sort them into an order…
A: ALGORITHM:- 1. Take input from the user. 2. Create a data structure class to store person details…
Q: There is an attached file named "velocities.txt", which contains two columns of numbers, the first…
A: Code:- import matplotlib.pyplot as plt def trapezoidal(t,v): area = v[0] + v[t] for i in…
Q: This is a Python program Reads information from a text file into a list of sublists. Be sure to…
A: A require program is as follows, import datetime import os # Define a function that returns a list…
Q: Python Run an object oriented python program that will guess for a person’s age based on their…
A: Ans:) In this program we follow the below approach: read data line by line and create a person…
Q: Three employees in a company are up for a special pay increase. You are given a file, say…
A: Program: //include header files #include <iostream> #include<fstream> #include…
Q: rite python program does the following: Reads a csv file named "train_final.csv" Print the last 100…
A: To read a csv file into a pandas DataFrame, you can use import pandas as pddf =…
Q: s there possible to create a program in C++ with the previously output. lname , fname [F] Adress…
A: The C++ program is written with menu driven program from the user where it gets the details of the…
Q: Write a Python program that reads each line of an input file original.txt and saves in a file called…
A: Code def main():#main function#open the file name original.txt in read…
Q: In a python program, create a new file and call it “ tracking”. Write to it four lines each contains…
A: Python Code for the above Question is given below
Q: Write a program that uses the sizeof operator to determine the sizes in bytes of the various data…
A: Given that We have to build a program and display the size of datatype with the use of sizeof…
Q: For this assignment, you will write a Python program that uses a file named scores.txt to store sets…
A: Answer : def main(): with open("scores.txt", "a") as file: while True:…
Q: In python: The file contain the content in the form pet1,pet2,pet3 Output will return [[‘pet1’,…
A: Here I have created a function named read_file(). In this function, I have opened the file in read…
Q: Write a program to read and store four student’s name and their Salaries, sort them into an order…
A: Write a program to read and store four student’s name and their Salaries, sort them into an order…
Q: Q/in python Open a file and write a program in C++, for example: #include void main { int x int y…
A:
Q: Write a program to read and store four student's car number and their distances, sort them into an…
A: For this problem, a class Student with instance variables id, car number and distance is created.…
Q: In Java Oleae nust read a file A photographer is organizing a photo collection about the national…
A: Actually, Java is a general-purpose also class-based, object-oriented programming language designed…
Q: Write a program that prints a table of all the Roman numeral equivalents of the decimal numbers in…
A: While loop is a most basic loop in c programing. while loop has one control condition and executes…
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: Three employees in a company are up for a special pay increase. You are given a file say…
A: The below given C++ program will obey the following rubrics: Including necessary header files. In…
Q: Using a sound level meter, the noise emanated from 10 Proton X50 at different frequency levels are…
A: a) Program: #include <iostream>#include <fstream>using namespace std; int…
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: reads in a file of student academic credit data. Each line of the input file will contain the…
A: Programming is instructing a computer to do something for you with the help of a programming…
Q: Find the attached file.
A: CODE TO COPY: // Header files section#include <iostream>#include <iomanip>#include…
Q: Write a program to calculate the average of seven integer score, the program should do the…
A: 1.In input.txt file name score1,score2,score3,score4,score5,averagethis table is created.…
Q: dent data that consists of a Student number, First name, Surname, and average assignment mark.…
A: Write a Java application that allows a user to enter student data that consists of a Student…
as soon as possible please
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 2 images
- In Python Prompt the user for a text file that contains a list of student names, one on each line. Also prompt the user for a CSV file that contains scores for the students in the following order: homework1, homework2, midterm exam, final exam. Each line in the CSV has four scores, delimited by a comma. Each name in the text file has the corresponding scores in the CSV file. You will need to calculate the weighted final grade for each student as follows: 5% homework1 5% homework2 40% midterm exam 50% final exam Homework is scored out of 10 points and exams are scored out of 100 points. You need to create a program that will read the scores from the CSV file, calculate the weighted final grade, and display the resulting final grade, along with the student's name. Sample input files are attached. You can assume that the same number of lines will be in the input files, and that the order of the names and corresponding grades is the same in the two files. Display the name and final grade…Write a program in Python that reads student information from a text file, then creates a text file that records the course grades of the students and a final grade. Each row of the .txt file contains the Last Name, First Name, Midterm1 score, Midterm2 score, and the Final score of a student, each separated by a space. A sample of the student information is provided in StudentInfo.txt below. Assume the number of students is at least 1 and at most 20. The program performs the following tasks: • Read the file name of the .txt file from the user. • Open the .txt file and read the student information using readline() or readlines(). • Compute the average exam score of each student. • Assign a letter grade to each student based on the average exam score in the following scale: ◦ A: 90 =< x ◦ B: 80 =< x < 90 ◦ C: 70 =< x < 80 ◦ D: 60 =< x < 70 ◦ F: x < 60 • Output the first names, last names, exam scores, and letter grades of the students into a text file named…In python The text file “studentMarks.txt” has been provided for you. Each line contains the Last Name, First Name and 8 marks separated by spaces of a single student. For each student in the file, adjust the file to include the average of their top 6 marks, rounded to 1 decimal place, at the end of the line. For example, in the file, the line may say: Mars, Bruno 82 82 85 94 65 79 81 90 Afterwards, it should be updated to say: Mars, Bruno 82 82 85 94 65 79 81 90 Top6Avg: 85.7 Your program must define a function to determine the average of the top 6 marks. You may define more functions as needed for your program.
- In python: The file contain the content in the form pet1,pet2,pet3 Output will return [[‘pet1’, ‘pet2’, ‘pet3’],[‘pet1’, ‘pet2’, ‘pet3’],…] or none if wrong format for example : PET.txt Cat, Dog, Turtle Hamster, Dog, Dog, , Turtle PETS = read_file(‘PET.txt’) len(PETS) Output: 3 PETS[1] Output: [‘Hamster’, ‘Dog’, None] PETS[2] Output:['Dog', None, 'Turtle'] Play.txt Hamster, Fish Crocodile Play = read_file("Play.txt") print (Play) Output : NoneWrite a JAVA program that reads the student information from a tab separated values (tsv) file. The program then creates a text file that records the course grades of the students. Each row of the tsv file contains the Last Name, First Name, Midterm1 score, Midterm2 score, and the Final score of a student. A sample of the student information is provided in StudentInfo.tsv. Assume the number of students is at least 1 and at most 20. Assume also the last names and first names do not contain whitespaces. The program performs the following tasks: Read the file name of the tsv file from the user. Open the tsv file and read the student information. Compute the average exam score of each student. Assign a letter grade to each student based on the average exam score in the following scale: A: 90 =< x B: 80 =< x < 90 C: 70 =< x < 80 D: 60 =< x < 70 F: x < 60 Compute the average of each exam. Output the last names, first names, exam scores, and letter grades of the…I need help with a java problem: Write a program that reads the student information from a tab separated values (tsv) file. The program then creates a text file that records the course grades of the students. Each row of the tsv file contains the Last Name, First Name, Midterm1 score, Midterm2 score, and the Final score of a student. A sample of the student information is provided in StudentInfo.tsv. Assume the number of students is at least 1 and at most 20. Assume also the last names and first names do not contain whitespaces. - (The rest in described in the attached image) Code - import java.util.Scanner;import java.io.FileInputStream;import java.io.FileOutputStream;import java.io.PrintWriter;import java.io.IOException; public class LabProgram { public static void main(String[] args) throws IOException { Scanner scnr = new Scanner(System.in); /* TODO: Declare any necessary variables here. */ /* TODO: Read a file name from the user and read the…
- Write a program that reads student data from a file, compute their GPA and writes the results to a different file. 1. The user should have the option to either enter their text file that contains the student grades or use the provided text file that contains theinformation. The data in "indata.txt" should look similar to this, Lara_Croft75 70 91 69 89Chris_Redfield68 88 79 85 94Johnny_Cochran69 98 95 77 80Wanda_Maximoff84 86 98 95 92Luke_Skywalker74 96 80 98 97William_Kurt89 52 99 81 58Samuel_Jackson50 96 50 64 95END_OF_FILE This is supposed to be in python. This is what I have so far. I have no experience I apologise. I am trying to finish the GPA calculating program currently but am having trouble finishing it. grade = input("enter grades")points = 0 if grade is 90-99:total_points = 4.0if grade is 80-89:total_points = 3.0if grade is 70-79:total_points = 2.0if grade is 60-69:total_points = 1.0if grade is 50-59:total_points = 0.0gpa = total_points/len(grade)print(gpa,"is gpa")For this assignment, you will write a Python program that uses a file named scores.txt to store sets of bowling scores for different dates. scores.txt should store the data so that each line has a month, day, and the scores the user earned on that date. As an example, scores.txt might look something like this: January 15 200 300 126 200 250April 20 125 100 May 17 300 100 215 The very first time your program starts, scores.txt should not exist (i.e. create it with Python code the first time the program runs). In your main function, continuously give the user the following five options: Quit the program. View all Scores. If the user selects this option, call a function named view_scores. This function should print the scores in a nicely formatted manner. For example: "On January 15, you scored 200, 300, and 126", etc.. Add a Score. If the user selects this option, call a function named add_score. This function should ask the user for a month, day, and as many scores as they want to…Write a program that reads student information from a text file, then creates a text file that records the course grades of the students and a final grade. Each row of the .txt file contains the Last Name, First Name, Midterm1 score, Midterm2 score, and the Final score of a student, each separated by a space. A sample of the student information is provided in StudentInfo.txt below. Assume the number of students is at least 1 and at most 20. The program performs the following tasks: • Read the file name of the .txt file from the user. • Open the .txt file and read the student information using readline() or readlines(). • Compute the average exam score of each student. • Assign a letter grade to each student based on the average exam score in the following scale: ◦ A: 90 =< x ◦ B: 80 =< x < 90 ◦ C: 70 =< x < 80 ◦ D: 60 =< x < 70 ◦ F: x < 60 • Output the first names, last names, exam scores, and letter…
- 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 example of the two CSV files is attached below. One of the file is the crime database and the other one is the suspect database. Specification Your task is to write a python program that will take three CSV file names on the command line. The first CSV file contains STR counts for DNAs found in a list of crime scenes; the second CSV file contains a list of suspect's names and their DNA sequences; the third CSV file name is the output file where you write a CSV file that maps each suspect's name to the list of Crimes that have DNAs matching the suspect. Your program will take three file names on the command line: The first command line argument is a file name for a crime database file in csv file format. The header row would look like this:CrimeID,STR1,STR2,STR3,...Where each STRi is a short DNA sequence that is composed of DNA bases A/C/G/T. And each row will comprise of a CrimeID of the form CIDXXXXX, an integer count for each of the STRs. The second command line argument is a…Using matplotlib, a Python program that reads the contents of the file see attached then plots the data as either a line graph or a bar chart. Be sure to display meaningful labels along the X and Y axes, as well as the tick marks. The file contains the average gas price for each week in the year 1994. (There are 52 lines in the file.) I copyed and pasted the contents of the file 0.9920.9951.0010.9991.0051.0071.0161.0091.0041.0071.0051.0071.0121.0111.0281.0331.0371.041.0451.0461.051.0561.0651.0731.0791.0951.0971.1031.1091.1141.131.1571.1611.1651.1611.1561.151.141.1291.121.1141.1061.1071.1211.1231.1221.1131.1171.1271.1311.1341.125