I\'m trying to create an employee
object via user input, but I\'m running into issues with my code. When I run this nothing happens and it\'s not throwing any e
I think you want something like this
class employee(object):
def __init__(self,name,pay_rate,monday,tuesday,wednesday,thursday,friday,saturday,sunday):
self.name = name
self.pay_rate = pay_rate
self.monday = monday
self.tuesday = tuesday
self.wednesday = wednesday
self.thursday = thursday
self.friday = friday
self.saturday = saturday
self.sunday = sunday
@staticmethod
def create_from_rawinput():
return employee(
raw_input("Employee name:"),
raw_input("Pay Rate:"),
raw_input("Enter monday hours:"),
raw_input("Enter tuesday hours:"),
raw_input("Enter wednesday hours:"),
raw_input("Enter thursday hours:"),
raw_input("Enter friday hours:"),
raw_input("Enter saturday hours:"),
raw_input("Enter sunday hours:")
)
new_emp = employee.create_from_rawinput()