To create a Python Processing IDE robot and add variables decision structures and coding techniquesSolution.pdf
CSCI203 Python Programming Assignment Help
To create a Robot similar to the one shown below. Then you will add variables, decision structures
and coding techniques found in Chapter 2 and 3 slides to make the Robot’s arms move up and
down following the cursor and the eyes change shape and color. Your Robot doesn’t have to match
mine exactly and your colors can be
different than mine, but you do need to use the shapes and functions I listed
A. Open the python processing IDE.
B. Be sure to save your work often with the naming format:
Robot_YourInitials and make comments above sections of code.
1. At the top of your code, include the programming standards (your name,
etc.) found in blackboard “Start Here” section, step 3. (1 point).
2. You will again need the setup and draw functions. The window should be
at least 500 pixels squared, but can be bigger (I usually make mine 800
x 800) (1 point).
3. I used background to prevent a snake effect when the arms move, 12
ellipses (4 are duplicates in decision structures for the eyes to change
shape), 5 rect’s for the face, legs, and feet, 5 lines (2 are duplicates in
decision structures for the arms to move and 1 for the mouth). I used
stroke to change the color of the mouth line, noStroke for the eyes,
strokeWeight for the lines, and fill. Remember that shapes stack on top
of each other.
A video is provided to demonstrate all of the movements of shapes
mentioned at the top of the assignment.
Arms follow cursor up and down:
4. Place an expanded Conditional structure (if – else (Chapter 3)) to test
whether the cursor is above the middle of your window or below.
a. In one part of the Condition: have lines that have the arms raised.
b. In the other part of the Condition: have lines that have the arms
lowered. (2 points)
Eyes color and shape change:
5. Using Chapter 3 slides, create a global Boolean variable above the setup
function. It can be assigned one of the two possible values, it is up to
you what value to start with. (1 point)
6. Below and outside of the draw function, make a keyPressed function
(Chapter 1). The code in this function should flip/toggle the Boolean
variable value using a not operator whenever a keyboard key is pressed.
Be sure to use the global statement with the variable or your code won’t
work. (2 points)
7. Place another expanded Conditional structure (if – else (Chapter 3)) in the
draw function that tests the global Boolean variable.
c. In one part of the Conditional, use fills and ellipses to make the
sad eyes (the blue ones from the image above). (2 point)
d. In the other part of the Conditional, use three random() functions
in a fill (one for each of the RGB values. Remember colors have a
max value of 255) to make the eyes change color rapidly. You will
also need ellipses and another fill to change the eyes so the top
part of the eyes show instead of the bottom. (3 points)
8. Use good programming structure, use comments, etc. (2 points)
Get Assignment Help Now...!
Subjects We Offer
- Engineering Assignment Help
- MATLAB Assignment Help
- Mechanical Engineering Assignment Help
- Civil Engineering Assignment Help
- Computer Science Assignment Help
- Electrical Engineering Assignment Help
- Electronics Assignment Help
- Economics Assignment Help
- Management Assignment Help
- Do My Assignment
- Cheap Assignment Help
- Programming Assignment Help
- Law Assignment Help
- Assignment Provider
- Finance Assignment Help
- Python Assignment help
- Healthcare Management Assignment Help
- Computer Network Assignment Help
- History Assignment Help
- Industrial Engineering Homework Help
- IT Management Assignment Help
- Nursing Assignment Help
- Operating System Assignment Help
- Statistics Assignment Help
- Material Science Assignment Help
- Mechanical Engineering Homework Help
- University Assignment Help
- Agriculture Engineering Homework Help
- ATHE Courses Assignment Help
- Capital Budgeting Assignment Help
- BTEC Assignment Help
- HND Assignment Help
- Material Science Assignment Help
- Psychology Assignment Help
- Resit Assignment Help
- Computer Architecture Assignment Help
- Data Structure Assignment Help
- Database Assignment Help
- PHP Assignment Help