Please help!!!!

Robin Porter mogul at primus.ca
Wed Jun 7 22:58:09 EDT 2000


I have been trying to run some basic Python code in PYTHON version 1.5.2 in
a Win9x OS and have been having one problem consistantly when trying to run
it.  These are the steps I take each time.

1.)Open PYTHON idle (GUI)
2.)Open a new window
3.)Open the file I want to run (PAYpython.py)
4.)Click EDIT
5.)Click RUN
6.)A new screen appears and prompts me to enter the number of hours worked.

(Up until this point all seems fine)

7.)I input the number 50
8.)Press enter and expect to be asked the rate of pay.

**I GET NOTHING**

Absolutely nothing happens after this point.....

Could someone please tell me what is wrong.  I have re-installed Python
1.5.2.  I have tried other code and all seems to lead me to the same
problem.  Please help!

Thank you,

Robin

The code in PAYpython.py is....

TaxRate  = 0.23
MinPay   = 300.0
RegHours = 40.0

TaxPayable = 0
Overtime = 0
OvertimeHours = 0.0

HoursWorked = float(raw_input("Please enter the hours worked per week? "))
PayRate = float(raw_input("Please enter the rate of pay? "))

if HoursWorked > RegHours:
    OvertimeHours = HoursWorked - RegHours
    Overtime = (OvertimeHours) * (PayRate*1.5)

GrossPay = ((HoursWorked-OvertimeHours)*PayRate)+Overtime

if GrossPay > MinPay:
  TaxPayable = (GrossPay-MinPay)*TaxRate

NetPay = (GrossPay-TaxPayable);

print "The gross pay is %f" % GrossPay
print "The net pay is %f" % NetPay






More information about the Python-list mailing list