Complete the code to set the default orientation of a component to 0 degrees.
component.orientation = [1]The default orientation for most components is 0 degrees, meaning no rotation from the standard position.
Complete the code to rotate a component by 90 degrees clockwise.
component.orientation = (component.orientation + [1]) % 360
Adding 90 degrees rotates the component clockwise by a quarter turn. The modulo 360 keeps the orientation within 0-359 degrees.
Fix the error in the code that sets component orientation to 270 degrees but mistakenly uses a string.
component.orientation = [1]Orientation should be a numeric value, not a string. Using 270 as a number correctly sets the rotation.
Fill both blanks to correctly flip a component horizontally and then rotate it by 180 degrees.
component.flip = [1] component.orientation = (component.orientation + [2]) % 360
Setting flip to True flips the component horizontally. Adding 180 degrees rotates it upside down.
Fill all three blanks to set a component's orientation to 90 degrees, flip it vertically, and then reset orientation to 0.
component.orientation = [1] component.flip_vertical = [2] component.orientation = [3]
First, the component is rotated 90 degrees. Then it is flipped vertically by setting flip_vertical to True. Finally, orientation is reset to 0 degrees.
