Ask Question
16 December, 04:23

Assume that a variable hoursWorked has been initialized. Write a statement that assigns the value True to the variable workedOvertime if hoursWorked is greater than 40 and False otherwise.

+2
Answers (1)
  1. 16 December, 05:55
    0
    Following are the statement which is given below:

    workedOvertime = hoursWorked > 40 / /assigns the value to workedOvertime

    Explanation:

    In this above statement, there is hoursWorked variable which is already initialized There is also another variable "workedOvertime" which assigns the value of the TRUE if the "hoursWorked" is greater then the 40 otherwise it initializes the value FALSE in the "workedOvertime" variable.

    The > operator is used for checking the condition that variable "hoursWorked" is greater than 40 or not.
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Assume that a variable hoursWorked has been initialized. Write a statement that assigns the value True to the variable workedOvertime if ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers