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:

  1. Your program will make your robot dance using random actions for approximately 20 30 seconds

  1. Let the user know that they have three option Drive, LEDs, or Servo. Based on the option they choose they can control the device.

  1. 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.
    1. w = forward
    2. a = turn left
    3. d = turn right
    4. s = move back
    5. x = stop
    6. g = decrease speed
    7. t = increase speed
    8. z = exit using sys module

  1. 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

  1. 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 blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!