0

I honestly have no idea what I'm doing but, I know as soon as I get a bit of help, it'll come to me. So, here's the code and I know I've done something wrong? Won't let me complete the input?

"""
WeeklyPay.py: generate payroll stubs for all hourly paid employees and summarizes them
"""


def main():
    """
    WeeklyPay.py generates and prints and employee pay stubs based off hours_worked, hourly_rate, and gross_pay
    :return: None
    """

    total_gross_pay = 0
    hours_worked = 0
    more_employee = input()

more_employee = input("Did the employee work this week? Y or y for yes: ")
while more_employee == "Y" or "y":
    hours_worked = input("How many hours did the employee work? ")
    hourly_rate = input("Please enter the employee's hourly rate: ")
trolologuy
  • 1,900
  • 4
  • 21
  • 32
Inge Teleky
  • 31
  • 1
  • 1
  • 5
  • 1
    Your code works fine on my computer. – Harsh Nagarkar Jan 17 '20 at 20:54
  • more_employee takes only one value, and the while is infinite or never used... – B. Go Jan 17 '20 at 21:38
  • Try messing around with statements of the form `more_employee == "Y" or "y"`. In any case, this is a duplicate of https://stackoverflow.com/q/15112125/11301900. – AMC Jan 17 '20 at 22:36
  • Does this answer your question? [How to test multiple variables against a value?](https://stackoverflow.com/questions/15112125/how-to-test-multiple-variables-against-a-value) – AMC Jan 18 '20 at 01:10

0 Answers0