I am writing a program for python and need to create a loop that appends pay, hours, and wages to one list called lstEmp,and be able to exit the loop once you type in DONE. I am stuck please help.

def Input():
    try:
        name=raw_input("Enter your first and last name: ")
        titlename=name.title()
    except:
        return name


def Hours():
    try:
        wHours=int(raw_input("Enter the hours you worked this week: "))
    except:
        if wHours < 1 or wHours > 60:
            print "Employees' can't work less than 1 hour or more than 60 hours."
            return wHours
    

def Pay():
    try:
        pRate=int(raw_input("Enter your hourly wage: "))
    except:
        if pRate < 6 or pRate > 20:
            print "Employees' wages can't be lower than $6.00 or greater than $20.00."
            return pRate

def calc():
    
    


########################## MAINLINE CODE ###################################
    lstEmp=[]
name=""
empDone=""
while not empDone:
    Names=Input()
    WorkHours=Hours()
    Wages=Pay()
    empDOne=raw_input("Please type DONE when you are finished with employees' information: ")
    empDone.upper() == "DONE"

Value of name, Names, Workhours, Wages. EmpDOne and result of last line is not used. Capitalized name is supposed to mean object value by convention.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.