I have only been programming for about a month and my question is this. Once I am done in the class defining the functions and class, how can I use the user input with the functions. Any help is appreciated the can shed a little light.
class employee:
def __init__(self,first,last,pay,hours):
self.first = raw_input("whats your first name")
self.last = raw_input("whats your last name")
self.pay = int(input("how much do you make an hour"))
self.hours = int(input("how many hours do you have"))
def raise_amount(self, amount):
self.pay = int(input('how much would you like to raise the employee pay'))
def overtime(self,overtime):
if self.hours !=39:
print ("there is an error you have overtime standby")
num1 = self.pay / 2
overtime = num1 + self.pay
print self.first, + self.overtime(self.hours)
print employee(self.hours)
inputinside the constructor. What happens if you want to create an Employee from existing data?ctrl+kwhile editing to format it properly.