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.

Respuesta :

Answer:

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.