Ask Question

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.

+5
Answers (1)
  1. 15 April, 06:33
    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?
Find 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 the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers