This is for Python Programing version 3.8.5 - Need a program that uses a text file to store weekly payroll data for the office. The program should enable the user to enter the name, hourly pay rate, and weekly hours for a number of office employees. The pay rate and hours should be type float, and each datum should be written to its own line in the file. Enter data for at least five employees and then close the file. Please include Pseudocode and def main () function.
Q: 6. Write a Python program that reads a text file called student.txt. . The input text file contains…
A: Below I have provided a python program for the given question. Also, I have attached a screenshot of…
Q: In C language, 3. A text file name.txt - contains this data, Sam Davis Kobe S Bryant…
A: 1)Declare a file pointer 2)Open the file in read mode using fopen() 3)display the contents of the…
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: Suppose the owner of tuck shop gave you a file that contains the list of items, the number of items…
A: program should have only the following functions: • main function that calls all the functions…
Q: [Python (py3)] Please modify my code below such that Matrix A and Matrix B can be added if the…
A: Step 1: Import numpy and sys packages. Step 2: Open the input file and read its contents. Store it…
Q: Do the following program in Java Eclipse:A veterinarian services many pets and their owners. As new…
A: Program Instructions:Create a java program in eclipse and import all required modules.Now create a…
Q: Write a program that uses a while loop to store goals and assists for Lightning players in a text…
A: Here have to determine python code for write in file.
Q: 3. write a program that calculates and prints the monthly paycheck for an employee. The net pay is…
A: Note: As you have not mentioned any programming language, I am writing code in python. income =…
Q: Write a C++program to read a series of product names, count, and price of each item in a file called…
A: The answer is given below.
Q: You are required to write a C++ program that reads several hundreds of movie ratings from an input…
A: A C++ program is as follows, File name: “main.cpp” //Header file #include <iostream> #include…
Q: Problem: Write a Python program that reads from an input file named employees.txt some employee…
A: Actually, python is a easiest programming language. It is a dynamically typed programming language.…
Q: Write a program that computes the tax and tip on a restaurant bill for a patron with a $44.50 meal…
A: Answer:
Q: PYTHON without Def function Problem Statement Given a grades.txt file of grades on an exam, output…
A: file1 = open("grades.txt")file2 = open("final_grades.txt", "w+") next(file1) # Skipping the header…
Q: 3. Count Even N(from codeChum, modified) by Catherine Arellano Write a program that will receive a…
A: int getNum(){ int n; scanf("%d", &n); }
Q: A company stores payment information for their employee working on a project and paid on a project…
A: In question, you have said that the .txt file's first line will indicate the number of employees but…
Q: Suppose the owner of tuck shop gave you a file that contains the list of items, the number of items…
A: The program has 5 functions, getItemData,calculateTotal,calAverage,print,calcAvgGreater Each…
Q: please code in python You are probably familiar with the famous Fibonacci sequence of numbers,…
A: The question is to write the recursive python code for the given problem.
Q: Your program should use a loop to read data from a text file which contains students' names and 3…
A: def main(): #set count of grades readFile() #readFile reads text file scores.txt and print the…
Q: or this task you are asked to write a program that will open a file called “story.txt” and count the…
A: Note: Since you have not provided the language to write the code so I am using Java language to…
Q: Write code for the following: Write Python code that uses a loop to prompt the user for five…
A: Write Python code that uses a loop to prompt the user for five floating point numbers and reports…
Q: I have this code but , doesn't print on the file, so can you figure the error the code is…
A: The code is working fine. Kindly try it in Dev C++. I will work fine In next step I am posting the…
Q: Write a program that reads a file consisting of students’ test scores in the range 0–200. It should…
A: Program code: //include the required header files #include <iostream> #include <fstream>…
Q: Exercise 5: Write a python program that reads from a text file whose name is provided by the user…
A: Required: Write a python program that reads from a text file whose name is provided by the user…
Q: You are required to write a C++ program that reads several hundreds of movie ratings from an input…
A: Program code: //Header file #include <iostream> #include <vector> #include…
Q: 3. Write a program that prompts the user for a file name, assuming that the file contains a Java…
A: Algorithm: 1. Read the file using file import . 2. The try loop will continuously evaluate the file…
Q: A local Road Safety Department is tasked with monitoring and issuing speeding tickets for drivers…
A: Hey there, I am writing the required solution based on the above given question. Please do find the…
Q: Displayed below is an incomplete code for matrix addition, scalar multiplication, and…
A: It is defined as a general-purpose, high-level, simple but effective object-oriented programming…
Q: Problem: Write a Python program that reads from an input file named employees.txt some employee…
A: Using python 2.7 def printHeader():print…
Q: A company stores payment information for their employee working on a project and paid on a project…
A: We have to write a python program that is as follows:-
Q: You are required to write a C++ program that reads several hundreds of movie ratings from an input…
A: Program: //Header file #include <iostream> #include <vector> #include <fstream>…
Q: A company stores payment information for their employee working on a project and paid on project…
A: Python is a general-purpose interpreted, interactive, object-oriented, and high-level programming…
Q: Write a few statements that open a file called "words" and writes the last word in the file to a…
A: Given: C-program regarding file manipulation Objective: This program should open a file naming…
Q: Write Python code that will open a file named aboutme.txt and write your name to the first line in…
A: To open a file named aboutme.txt and write your name to the first line in the file and your age (as…
Q: This is for Python version 3.8.5 - this is a 2 part question; I cannot submit separate as it gets…
A: Pseudocode: Open file. While True. Read the name. Write the name in a file. If the name is empty,…
Q: I have a text file and I want to read it in C++. variables to use: fname, lname , Id nr, Gender…
A: Actually, the given information is: The file is : Tommy James 23456731667 Streetname 45 , 154…
Q: A file named gang.txt is shown below. Write Python code that opens this file, reads only the first…
A: def file_read_from_head(fname, nlines): from itertools import islice…
Q: or this assignment, you will write a program that reads employee work data from a text file, and…
A: Java is an Object oriented programming like c++ which was developed by Sun microsystems It…
Q: Initially, you will prompt the user for the names of two files: one will contain Customer…
A: import csvimport sys # ask the user for the file namescustomer_info = input("Enter the file name…
Q: Write a second C++ Program (FileTemps.cpp) that reads the names and temperatures of the n cities…
A: C++ Program for above : #include <bits/stdc++.h> using namespace std; int main() {…
Q: In Python, Use the file scores.txt (below) to help with the coding problem.! name.txt ——————— John…
A: Q: Code the given problem
Q: The name should be able to be sorted last name first. Profession should be able to be sorted…
A: q: The name should be able to be sorted last name first. Profession should be able to be sorted…
Q: Create an input text file that has the name input.txt with the following content. In Java please. 10…
A: import java.io.File; // Import the File classimport java.io.IOException; // Import the IOException…
Q: A local Road Safety Department is tasked with monitoring and issuing speeding tickets for drivers…
A: Hey there, I am writing the required solution based on the above given question. Please do find the…
Q: another such that ratio of the radius of adjacent discs remains constant. The area is a cone is…
A: It is defined as a direct descendant of C programming language with additional features such as type…
Q: Use the Bash shell for the completion of this project. Develop a shell scripting application that…
A: Given: Use the Bash shell for the completion of this project.Develop a shell scripting application…
Q: Problem Definition Task. Your task is to develop a python program that reads input from text file…
A: Actually, python is a easiest programming language. It is a structural and object oriented…
Q: This is a python file Fix this code and the output is the attachment #filename:…
A: You have used “from modValidateEmail import *” and this is not a module in python library and there…
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 complete C program that inputs marks of a student in 5 courses using any loop and writes…
A: A file is used to store data permanently in a storage device. The file handling feature of C…
This is for Python Programing version 3.8.5 -
Need a
Please include Pseudocode and def main () function.
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 3 images
- Problem Definition Task. Your task is to develop a python program that reads input from text file and finds if the alphanumeric sequence in each line of the provided input file is valid for Omani car license plate. The rules for valid sequences for car plates in Oman are as follows: Each sequence is composed of 1 to 5 digits followed by one or two letters. Digits cannot start with 0, for instance, 00, 011, or 09 are not valid digit sequences. The following list are the only valid letter combinations: ['A','AA','AB','AD','AR','AM','AW",'AY"', 'B', BA','BB','BD',"BR','BM',"BW',"BY', 'D','DA','DD','DR','DW','DY', 'R','RA','RR','RM','RW','RY', 'S','SS', 'M','MA','MB','MM','MW','MY", "W',"WA',WB',"wW', Y,YA','YB','YD','YR','YW',YY] Program Input/Output. Your program should read input from a file named plates.txt and write lines with valid sequences to a file named valid.txt. Any line from the input file containing invalid sequence should be written to a file named invalid.txt. Each line…Problem description: Write a python application to simulate an Amazon online book shoppingsystem, namely “Amazing”. Design solution: The template file contains a list of books sold on Amazing, each item in the listcontains the title, publication year, author and the prices. The program will generate anitems_dict where each key is the title of the book and the values will be a list of year, authorand price information. A customer will be presented with a main menu with 4 different options:display all items, add an item to cart, checkout and exit the program. A customer can buy anitem by entering the title of the book. This program implements a dictionary called cart, whereeach key is the title and the values are the list of year, author and price and We assume onecopy is added with each selection. The program keeps repeating by displaying the main menuto user until user hits the quit button. If user hits the checkout option, the program will displayall the items in the cart and display…CMPSC 125: C++ Programming Programming Project Assignment Program Description: This assignment focuses on while loops and random numbers. Turn in a file named Lab4_yourFirstName.cpp. Your program allows the user to play a game in which the program thinks of a random integer and accepts guesses from the user until the user guesses the number correctly. After each incorrect guess, you will tell the user whether the correct answer is higher or lower. The below shows one sample execution of your program. Your output will differ depending on the random numbers chosen and user input typed, but the overall output structure should match that shown below: I am thinking of a number between 1 and 100 Your guess? 50 [Enter] It's lower Your guess? 25 [Enter] It's higher Your guess? 35 [Enter] It's lower Your guess? 30 [Enter] It's higher Your guess? 32 (Enter] It's lower Your guess? 31 [Enter] You got it right in 6 guesses! Do you want to play again? Y[Enter] I am thinking of a number between 1 and…
- Average grades bar chart Write a python program grades.py that reads a file of assignment grades and draws a bar chart of the average grades for each assignment. Save the figure as grades.png in the current working directory. The format of a line in the file is: assignment_type grade Note that there is a single space between the assignment type and the grade. E.g. exam 92.80 Your program must contain the following functions: Function name Function description Function input(s) Function return value(s) get_grades() This function takes a file name as input and populates a dictionary containing the assignment types and grades. Filename string Dictionary of grades main() This function prompts for the grades file name. Next, it calls the functions get_grades(). Next, it draws the bar chart of the average grade for each assignment. Hint: You can use the mean function of the statistics module to calculate the average of a list. None None Use the starter…in c++ Write a program to generate a random number between 1 - 100, and then display which quartile the number falls in. First quartile is 1 - 25 Second quartile is 26 - 50 Third quartile is 51 - 75 Fourth quartile is 76 - 100 To generate a random number, follow these steps: include necessary header files #include <cstdlib> //for random functions #include <ctime> //for time functions set constants for the minimum and maximum values of the desired range const int MIN_VALUE = 1; //minimum range value const int MAX_VALUE = 100; //maximum range value seed the random number generator (RNG) with a unique unsigned int value - system time! unsigned seed = time(0); //system time in seconds since 1/1/1970 srand(seed); //seed the RNG get a random number in the desired range int num = (rand() % (MAX_VALUE - MIN_VALUE + 1)) + MIN_VALUE; The program should: contain header comments as shown in class display a "hello" message (more descriptive than shown in sample)…Instruction: It should be a C++ PROGRAM INCLUDE THE HEADER FILE, MAIN CPP, AND BSTREE.CPP There is a real program developed by a computer company that reads a report ( running text ) and issues warnings on style and partially corrects bad style. You are to write a simplified version of this program with the following features: Statistics A statistical summary with the following information: Total number of words in the report Number of unique words Number of unique words of more than three letters Average word length Average sentence length An index (alphabetical listing) of all the unique words (see next page for a specific format) Style Warnings Issue a warning in the following cases: Word used too often: list each unique word of more than three letters if its usage is more than 5% of the total number of words of more than three letters Sentence length : write a warning message if the average sentence length is greater than 10 Word length : write a warning message if the…
- (Data processing) A bank’s customer records are to be stored in a file and read into a set of arrays so that a customer’s record can be accessed randomly by account number. Create the file by entering five customer records, with each record consisting of an integer account number (starting with account number 1000), a first name (maximum of 10 characters), a last name (maximum of 15 characters), and a double-precision number for the account balance. After the file is created, write a C++ program that requests a user-input account number and displays the corresponding name and account balance from the file.Language = Python Use text file to store all the scores and the Student Name must be CAPITALIZED regardless of the input. Import at least 1 file. The program must be able to store at least 5 students. Design a program that will perform basic grade computation. The program will ask the user for their name and 5 numeric inputs with the following weights and a perfect score of 100: Total Quiz Score (30%) Total Assignment Score (10%) Preliminary Course Assessment Score (20%) Midterm Course Assessment Score (20%) Final Course Assessment Score (20%) Then with a click of a button, will generate the total grade in a label with the words label “ Student Name: [Student Name] Quiz Score: [Quiz Score] Assignment Score: [Assignment Score] PCA: [PCA] % MCA: [MCA] % FCA: [FCA] % Final Grade: [Grade] Equivalent: [Equivalent] ” that will show the Equivalent grade from the table below and prompt a message to show if the student passed or failed. If the grade is greater than or equal to 60, the…Using Python: program6_1.pyWrite a program that uses a text file to store weekly payroll data for the office. The program should enable the user to enter the name, hourly pay rate, and weekly hours for a number of office employees. The pay rate and hours should be type float, and each datum should be written to its own line in the file. Enter data for at least five employees and then close the file.Sample Output See image below program6_2.pyThis program reads the text file created in the program above and then calculates and prints each employee's weekly pay. Note the currency format with commas for thousands. The program should finish by printing the total payroll for the office.Sample Output see image below
- I need help writing a C++ code. Write a program that uses a structure to store the following information about a customer account: Name Address City, state, and ZIP Telephone number Account balance Date of last payment The structure should be used to store customer account records in a file. The program should have a menu that lets the user perform the following operations: Enter new records into the file Search for a particular customer’s record and display it Search for a particular customer’s record and delete it Search for a particular customer’s record and change it Display the contents of the entire file Exit the program The menu should be displayed after processing of the the selected item until option #6 is chosen. Input Validation: When the information for a new account is entered, be sure the user enters data for all the fields. No negative account balances should be entered.Body Mass Index Write a program that reads names, weights, and heights from bmi.dat (provided with starter code; do not change the file name). Use the information to calculate and displays a person’s body mass index (BMI). The BMI is often used to determine whether a person with a sedentary lifestyle is overweight or underweight for his or her height. A person’s BMI is calculated with the following formula: BMI = weight × 703 / height2 where weight is measured in pounds and height is measured in inches. The file is in the format name weightInKG heightInCM You will read the name, weight and height for 4 people from the file, and you will need to convert the weights in the file to pounds (note that 1 kilogram = 2.2 pounds) and the heights to inches (2.54 cm = 1 inch). The program should display the person's name along with the calculated BMI and a message indicating whether the person has optimal weight, is underweight, or is overweight. Your output should look like A person’s weight…In C++ (don't copy paste the same answer that is already on this site, post unique code) Structures A menu-driven program gives the user the option to find statistics about different baseball players. The program reads from a file and stores the data for ten baseball players, including player’s team, name of player, number of homeruns, batting average, and runs batted in. (You can make up your data, or get it online ) Write a program that declares a struct to store the data for a player. Declare an array of 10 components to store the data for 10 baseball players. The program prints out a menu (in a loop, so this can be done again and again) giving the user a choice to: print out all users and statistics print out the statistics for a specific player print out all data for a specific team update the data for a particular player (change one of the statistics) DO ALL WORK IN FUNCTIONS. USE A FUNCTION TO READ THE DATA, A FUNCTION TO PRINT THE MENU, and FUNCTIONS FOR EACH OF THE MENU…