This is one part of a full out management program I'm working on. This script here is still a beta, please report back any errors including spelling errors.
Note: Even this section is uncomplete
Note: Even this section is uncomplete
Code:
import os,platform
def clearer():
systemver=platform.release()
if systemver=='XP':
os.system("cls")
elif systemver=='Vista':
os.system("clear")
else:
os.system("clear")
clearer()
def add(b):
clearer()
clearer()
c = int(raw_input("How much is %s paid an hour?: $" % b))
clearer()
d = int(raw_input("How many hours does %s work a day?: " % b))
clearer()
d2 = int(raw_input("How many days does %s work a week?: " % b))
clearer()
e = (c * d) * d2
q = "%s: $%s" %(b,e)
q = "".join(q)
print q
print "1) Yes"
print "2) No"
f = int(raw_input("Do you want to save this?: "))
if f == 1:
x = open('Employee.txt', 'a')
x.write(q)
x.write('\n')
x.close()
salary()
elif f == 2:
salary()
else:
salary()
def salary():
clearer()
print "1) Add Employee"
print "2) View Employees"
a = int(raw_input("What do you want to do?: "))
if a == 1:
add(raw_input("Employee Name: "))
elif a == 2:
clearer()
f = open('Employee.txt', 'r')
for line in f:
print line,
raw_input("Press Enter To Continue")
salary()
else:
print "Invalid Option"
salary()