Answer:
start,stop,step_size
Explanation:
Starting at 5 to for loop will count backward by 1 (hence the step_size being -1) until it reaches 0 (stop).
Answer:
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE)
Explanation:
JFrame is the swing class that is used to display a frame object. The JFrame display contains an X button on the top right position which is used to turn off the display of the frame. However if we want to terminate the program on pressing the X button, we need to update the DefaultCloseOperation for the frame. JFrame provides a method ''setDefaultCloseOperation' for this purpose. When this method is called with the argument JFrame.EXIT_ON_CLOSE , it will cause the program to exit when the close button is pressed.
Answer:
# The below code is in python programming language.
if(numberOfSides==4): #check the value number of slide is equal to 4 or not.
isQuadrilateral=True # assignment statement for if condition
else:
isQuadrilateral=False # assignment statement for else condition
Explanation:
The above code is in python language in which--
- The first lines are the "if" condition which checks the value of "numberofslides" variable.
- The second lines assign true in "isQuadrilateral" variable if "if" condition is true.
- The third line is for "else" statement that executes when the "if" condition is false.
- The fourth line is for "else" statement which assigns the value false to the numberofslides variables.
Answer:
C stopping.
Explanation:
The situation varies, if there is a cross-walk and there is a pedestrian trying to cross you it is mandatory to stop. and allow the pedestrian the right of way. so if you're driving and suddenly stop to allow the pedestrian their right of way then all oncoming vehicles must stop to allow the pedestrian to cross the street.