I am just getting into Python and I am a newb to say the very least. I am playing around in PyCharm and I am trying to put together something basic for Employee data entry.
I'm sure you can see the gist in my script. Anyway, first I have tried for a bit to figure away to get it to spit out Salary, Bonus and Annual as currency but can't. You know $60,000 instead of 60000.
Also, I wanted it to give a bi-weekly pay schedule if you entered in the date of the first paycheck.
I'm trying to brain storm.
name = input('Enter Employee Name: ')
# This should be an integer that represents the age of an employee at GPC
try:
age = int(input('Enter Employee Age: '))
except:
print('Please enter a whole number')
exit()
job = input('Enter Employee Job: ')
# This should be an integer that represents the salary of the employee at
GPC
try:
salary = int(input('Enter Employee Salary to the Nearest Dollar: '))
except:
print('Please enter only numbers without foreign characters')
exit()
salary_bonus = int(input('Enter employee bonus percentage '))/100
annual_income = (salary * salary_bonus) + salary
import datetime
now = datetime.datetime.now() # Current Year
u = datetime.datetime.strptime('2016-12-30','%Y-%m-%d')
d = datetime.timedelta(weeks=2)
t = u + d
# Data Output
print('Employee: ', name)
print('Age: ', age)
print('Job Title: ', job)
print('Annual Salary: ', round(salary,2))
print('Biweekly Paycheck: ', round(salary / 26, 2))
print('Bonus for', now.year, ': ', round(salary * salary_bonus, 2))
print('Actual Annual Income: ', round(annual_income, 2))
print('Your pay schedule will be:')
print(t)
print(t+d)