Question: Problem -1: Write a python function display () for each requirement to read the file exam.txt and (1) Display K in place of all

Problem -1: Write a python function display () for each requirement to read the file "exam.txt" and (1) Display "K" in place of all the occurrence of "C" in the word College. (II) Display "K" in place of all the occurrence of "C" Note: To demonstrate the function, create a file exam.txt with two lines at minimum. The lines should contain College and Centennial many times. Problem - 2: What is CSV file? What are its characteristics? When do we use CSV file? Create a "student.csv" file with the student's records which are stored in the format: ID, Name, and Points Earned. Write a program to read all content of "student.csv", count number of records present in this CSV file and display records of only those students who scored more than 80 points. Problem - 3: Create a data file containing the following data: Identification Number 10031 10067 10083 10095 Write a program that uses the information contained in the data file created to produce the following pay report: ID No. Rate Hours Regular Pay Overtime Pay Gross Pay Any hours worked above 40 hours are paid at time and a half. At the end of the individual output for each ID number, the program should display the totals of the regular, overtime, and gross pay columns. Problem - 5: Problem - 4: Write a program named Machine: Accepts two floating point numbers, using one input ( statement, and calls three functions named sum, difference, and product. The function sum () uses a variable parameter *num. Displays the arguments received when called The function sum will calculate the sum of the numbers The function difference will calculate the difference of the numbers The function product will calculate the product of the numbers The program should then print the input numbers and their sum, difference and product. Note: You will develop all the required functions in a module "myMod" and utilize those functions by importing your model "myMod" read x, n Write a program to evaluate the x power of n. Hint: The following is the flowchart to implement set r = 1 n!=0? no Rate 6.00 5.00 6.50 8.00 return r yes n%2!=0? Hours 40 48 35 50 yes r=r*x no X=X*X ving to bas n=n/2 48 darch
Step by Step Solution
There are 3 Steps involved in it
Sure Here are the solutions to the problems you provided Problem1 python def display with openexamtxt r as file for line in file line linereplaceC K Replaces C with K in the word College printlinerepl... View full answer
Get step-by-step solutions from verified subject matter experts
