Question: i'm struggling with this Question.. Any help ? This is in Python... Requirements: Your program will make your robot dance using random actions for approximately
i'm struggling with this Question.. Any help ? This is in Python...
Requirements:
- Your program will make your robot dance using random actions for approximately 20 30 seconds
- Let the user know that they have three option Drive, LEDs, or Servo. Based on the option they choose they can control the device.
- Ask the user to decide what movements the robot should make next. The following letters perform specific actions allow them to use all actions. You need to be sure to ask them again if they use the wrong letter.
- w = forward
- a = turn left
- d = turn right
- s = move back
- x = stop
- g = decrease speed
- t = increase speed
- z = exit using sys module
- Allow the user to turn on the LEDs. If they turn them on prompt them to turn off. If they turn them off, prompt them to turn them back on or go back to the main program
- Output directions for the user to control the servo device. User should be able to move the servo left, right, and home position.
Use the following modules or others, if you choose.
import sys (can be used to exit/close when program is done)
import time (time.sleep can be used to pause your code)
import random (may want to use when coding the random movements)
Rubric = 60 pts
Minimum of three functions main needs to be one of them. Code should be organized into the correct amount of functions for your program.
Correct use of syntax/no errors
Program works and fulfills all requirements
Clear comments
Code is readable and efficient
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
