Answer:
<em>Jamie earned (Total pay) $500.</em>
<em></em>
Explanation:
We are given the following code:
<em>If (Rate >=10) OR (Hours <=40) Then </em>
<em> TotalPay = Hours * Rate </em>
<em>Else </em>
<em> TotalPay = (Hours * Rate)+(Hours–40)*Rate*1.5 </em>
<em>End If</em>
<em />
Let us understand the code line by line:
The first line contains an if statement with 2 conditions:
i.e. 1st condition:
The rate is greater than or equal to 10
2nd condition:
Number of hours are lesser than or equal to 40.
There is OR between the two condition i.e. the statement next to if() statement will get executed if any one of them becomes true and else part will not be executed.
The next statement is:
TotalPay = Hours * Rate
It calculates the pay if any of the two conditions written earlier becomes true.
Next statement is else statement:
It will get executed given that the above if() statement becomes false.
Now, we are given that Jamie worked 50 hours last week and earns $10.00 an hour:
i.e.
Hours = 50
Rate = 10
Now, let get to the code execution.
The first condition is true i.e. Rate >= 10 (because Rate is 10 here)
So, the following statement will be used to calculate the Total pay:
TotalPay = Hours * Rate
and else part will not be executed.
TotalPay = 50 * 10 =<em> $500 </em>
<em></em>
<em>Jamie earned (Total pay) $500.</em>