20.5k views
3 votes
Write an If - Then statement that sets the variable hours to 10 when the flag variable minimum is set.

User Ine
by
5.0k points

2 Answers

1 vote

An If-Then statement that sets the variable hours to 10 when the flag variable minimum is set:

Using an explicit comparison:

if minimum:

hours = 10

This statement simply checks if minimum is True. If it is, then it assigns 10 to the hours variable.

User Lee McPherson
by
5.0k points
6 votes

Answer:

if(minimum){

hours=10

}

Step-by-step explanation:

when minimum is true that if condition is true and the variable hours set to 10

User Tamia
by
6.0k points