Modular Python output problems
<p>So i had to convert my pseudocode to python but my output isnt coming out the way it should be.</p>

<p>i enter the 40 hours work and 20 pay rate but the gross pay isnt coming out (gross pay should be 800). can anyone tell me whats wrong?</p>

<pre class="lang-python prettyprint-override"><code>BASE_HOURS = 40
OT_MULTIPLIER = 1.5

def main():
    hours_worked = int(input('Enter the number of hours worked: '))
    pay_rate = int(input('Enter the hourly pay rate: '))

    if hours_worked &gt; BASE_HOURS:
        calc_pay_with_OT(hours_worked, pay_rate)
    else:
        calc_regular_pay(hours_worked, pay_rate)

def calc_pay_with_OT(hours, pay_rate):
    overtime_hours = hours_worked - BASE_HOURS

    overtime_pay = overtime_hours * pay_rate + OT_MULTIPLIER

    gross_pay = BASE_HOURS * pay_rate + overtime_pay

    print('The gross pay is $ '), gross_pay

def calc_regular_pay(hours, pay_rate):
    gross_pay = hours * pay_rate

    print('The gross pay is $ '), gross_pay 

main() 
</code></pre>

<p>The print statement should instead be <code>print('The gross pay is $'+str(gross_pay))</code> The <code>str()</code> function converts the integer gross_pay into a string so that it can be concatenated in the print function.</p>

python modular