Review the following code snippet: # Function 4: touched_rig…
Review the following code snippet: # Function 4: touched_right()# TODO: Fill in the blanks to implement this function.# Recall: When the (..) button is pressed, the robot will increase its spinning speed by 2,# and play the note D5. # setting up an event that will be triggered when the left button on the robot is touched.@event(robot.when_touched, [False, True]) # the [True, False] list indicates the left button is touched.async def touched_left(robot): ________(Omitted)_________ # TODO: specify that SPEED and ROTATION_DIR are global variables print(‘Right button pressed’) # output message for debugging or user feedback. SPEED += 2 # increase the SPEED by 2 if ROTATION_DIR == “clockwise”: ________(Omitted)_________ # TODO: set the robot’s wheel speeds to rotate clockwise. elif ROTATION_DIR == “counter-clockwise”: ______(Question 4)________ # TODO: Question 4 – set the robot’s wheel speeds to rotate counter-clockwise. ______(Question 5)________ # TODO: Question 5 – play the note D5 for half a second. Using the code snippet above, answer Questions 4 and 5 using the drop down boxes. Question 4: [Question4] Question 5: [Question5]
Read DetailsPlease confirm that you will abide by the UF Honor Code at a…
Please confirm that you will abide by the UF Honor Code at all times during and after this exam. Please also confirm that you will READ EACH QUESTION CAREFULLY. Please utilize anatomical terminology when answering short answer questions. Finally, please affirm that you have done a complete/proper room scan and showed your blank white board to the camera.
Read Details