Can u aid with these. Please use while loops and also separate the function and the main file. As well use the .format python standard.
8. Implement the following function in the PyDev module functions.py and test it from a PyDev module named t68.py: def budget(available): Asks a user for a series of expenses in a month. Calculate the total expenses and determines whether the user is in "Surplus"J "Deficit"J or "Balanced" status. Use: expenses, balance, status = budget(available) Parameters: available , money currently available (float )= 9) Returns: expenses , total monthly expenses (float) balance , remaining balance (float) status , One of (str): "Surplus" if user budget is in surplus "Deficit" if user budget is in deficit "Balanced" if user budget is balanced Sample testing: i Monthly budget: $233.33 5 Enter an expense (6 to quit): $156.66 i Enter another expense (6 to quit): $23.66 i Enter another expense (6 to quit): $12.66 E Enter another expense (6 to quit): $15.66 i Enter another expense (6 to quit): $37.56 i Enter another expense (6 to quit): $65.66 i Enter another expense (6 to quit): $ Total expenses: $362.56 : Deficit: $162.56 Test functions . py: Choose File No le chosen I Submit I 9. Implement the following function in the PyDev module functions.py and test it from a PyDev module named t69.py2 def get_int(low, high): Asks a user 'For an integer value between low and high, and continues asking until an acceptable value is input. Use: value = getiintuou, high) Parameters: low - the lowest acceptable integer (inclusive) (int) high , the higest acceptable integer (inclusive) (int ) low) Returns: value - a number between low and high (int) a value between B and high 168 entered is too high a value between B and high 168: 71 entered is too low a value between B and high 168: 75 Test functions . py: ' Choose File No le chosen Submit 1D. Implement the following function in the PyDeV module functions.py and test it from a PyDeV module named t16.py2 def employeeipayroll(): Calculates and returns the weekly employee payroll for all employees in an organization. For each employee, ask the user for the employee ID number, the hourly wage rate, and the number of hours worked during a week. An employee number of zero indicates the end of user input. Each employee is paid 1.5 times their regular hourly rate for all hours over 46. A tax amount of 3.625 percent of gross salary is deducted. Use: total, average = employee_payroll() Returns: total - total net employee wages (i.e. after taxes) (float) average - average employee net wages (float) Use appropriate constants. Sample testing: i Employee ID: 1;; i Hourly wage rate: A; : Hours worked: gs : Net payment for employee 123: $2,125.67 : Employee ID: 12A Hourly wage rate: so Hours worked: Net payment for employee 124: $1,416.71 : Enter next employee ID: 6 E Total payment: $ 3,541.78 Average payment: $ 1,77 .89 Test functions . py: I Choose File No le chosen Submit