00:01
For this problem, you are asked to have the user input certain information about an employee and then print out a earning statement for that employee.
00:16
So in order to have an input, you just use input.
00:22
So i'm defining each of the things that are being input as a variable, the name, the hours, the hourly page, rate i've just called rate, the federal tax withholding rate i've called fed tax and the state tax withholding rate i've called st tax.
00:41
And then we need to do a little bit of calculations to find the things that will be printed out in the work statement.
00:51
So first, the gross wage is going to be the hours times the rate.
00:58
And i've just used for.
01:01
Float here to make sure that those are numbers that we're multiplying.
01:05
The federal percent is the federal tax withholding rate times 100.
01:14
And again, i've made that afloat.
01:16
Federal withholding will be the gross times the federal tax withholding rate.
01:26
The state percentage is the state withholding rate times 100.
01:31
The state withholding is going to be gross times the state tax.
01:38
And then deduction will be federal withholding plus state withholding.
01:43
And lastly, the net earnings will be gross minus deduction.
01:47
So i've started by printing an empty line here just to make it look nice.
01:53
And then we're just doing a bunch of print statements to write out the actual earning statement.
01:59
So first, employee name...