Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem 1: (40 points) Write a python script that creates a file and inserts information for these five employees. Requirements: Record Layout: The fields are

Problem 1: (40 points)

  1. Write a python script that creates a file and inserts information for these five employees.

Requirements:

Record Layout:

The fields are fixed length (name 6 - characters, ID - 1 character, pay type - 1 character, pay rate - 3 characters, hours - 2 characters, newline character at end of each line - 1 character = total 14 characters.

Name

ID

PayType

PayRate

HoursWorked

Kelly

1

H

12

32

Jason

2

S

700

40

Alice

3

S

720

40

Debra

4

H

13

19

Gordon

5

H

12

23

Hints:

  • Dont forget to add the at the end of each line. This adds a new line effect.

2. From problem 1 in assignment 7, convert the algorithm from your solution into Python code. Your code should output each employees name, ID, pay type, pay rate, hours worked, and the calculated gross pay. Test your solution on the file that you have created in Part A above. (20 points)

NOTE: If you complete this lab by creating and processing a CVS (comma separated file and it is correct, you will get 20 extra points.)

I need a working python code and want to be able to do the lab by creating and processing a CVS (comma separated file )please. this question has been wrongly answered before that's why I posted it. thanks

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Spatial And Temporal Databases 11th International Symposium Sstd 2009 Aalborg Denmark July 8 10 2009 Proceedings Lncs 5644

Authors: Nikos Mamoulis ,Thomas Seidl ,Kristian Torp ,Ira Assent

2009th Edition

3642029817, 978-3642029813

More Books

Students also viewed these Databases questions