Answered step by step
Verified Expert Solution
Question
1 Approved Answer
CS 177 Fall 2018 Lab 4 Due Date: This is a multi-part lab. You will complete Parts 1-2 with your team and Part 3 completely
CS 177 Fall 2018 Lab 4 Due Date: This is a multi-part lab. You will complete Parts 1-2 with your team and Part 3 completely on your own. The assignment is due by the end of your lab day (11:59 pm). Problem Description: Your team has been contracted to design Bob' a red, Circle robot that can be driven with a simple control panel. The design has 3 parts: 1. Build and test the Control Panel 2. Create 'Bob' the red robot Circle 3. Animate Bob completed as a team completed as a team completed on your own The overall objective is to be able to control Bob's movements using the control panel similar to a remote controlled vehicle and eventually to use Bob in children's learning games. You will start working in your team then complete the contract working individually and submit your completed code by 11:59 pm on the day of your lab to Blackboard. Part 1: Build and test the Control Panel The Control Panel is a graphics window (200 x 150 pixels) with a grey background color and the text 'Control' in it's title bar (see example). Four 40-pixel blue squares are drawn in the corners of the window. These blue squares will later be used to manage the robot's movements. The objective is to provide the user with an intuitive method to guide the robot. 1. Start your lab4.py Python program that imports the Graphics library and includes a header with the program name, your team member's names and a short program description 2. Verify that you have a copy of the graphics.py file in the same directory as your 1ab4.py file. 3. Write a function named drawControlsthat accepts no parameters and creates and returns the Control Panel graphics window including the blue squares in the as shown in the example. Write a function named checkControls() that accepts the Control Panel Graphics window as a parameter, waits for a mouse click in the Control Panel and returns one of five (5) possible results: 4. (-20,-20) if mouse click was detected within the top-left blue square (20, -20) if mouse click was detected within the top-right blue square (-20,20) if mouse click was detected within the lower-left blue square (20, 20) if mouse click was detected within the lower-right blue square Mouse click anywhere else in Control Panel return -1 5. Write a function named main() that accepts no param eters, calls the drawControls () function and then using a for loop, calls the checkControls( function 10 times SUGGESTION: For testing purposes, you can print () the values returned by checkControls CS 177 Fall 2018 Lab 4 Due Date: This is a multi-part lab. You will complete Parts 1-2 with your team and Part 3 completely on your own. The assignment is due by the end of your lab day (11:59 pm). Problem Description: Your team has been contracted to design Bob' a red, Circle robot that can be driven with a simple control panel. The design has 3 parts: 1. Build and test the Control Panel 2. Create 'Bob' the red robot Circle 3. Animate Bob completed as a team completed as a team completed on your own The overall objective is to be able to control Bob's movements using the control panel similar to a remote controlled vehicle and eventually to use Bob in children's learning games. You will start working in your team then complete the contract working individually and submit your completed code by 11:59 pm on the day of your lab to Blackboard. Part 1: Build and test the Control Panel The Control Panel is a graphics window (200 x 150 pixels) with a grey background color and the text 'Control' in it's title bar (see example). Four 40-pixel blue squares are drawn in the corners of the window. These blue squares will later be used to manage the robot's movements. The objective is to provide the user with an intuitive method to guide the robot. 1. Start your lab4.py Python program that imports the Graphics library and includes a header with the program name, your team member's names and a short program description 2. Verify that you have a copy of the graphics.py file in the same directory as your 1ab4.py file. 3. Write a function named drawControlsthat accepts no parameters and creates and returns the Control Panel graphics window including the blue squares in the as shown in the example. Write a function named checkControls() that accepts the Control Panel Graphics window as a parameter, waits for a mouse click in the Control Panel and returns one of five (5) possible results: 4. (-20,-20) if mouse click was detected within the top-left blue square (20, -20) if mouse click was detected within the top-right blue square (-20,20) if mouse click was detected within the lower-left blue square (20, 20) if mouse click was detected within the lower-right blue square Mouse click anywhere else in Control Panel return -1 5. Write a function named main() that accepts no param eters, calls the drawControls () function and then using a for loop, calls the checkControls( function 10 times SUGGESTION: For testing purposes, you can print () the values returned by checkControls
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started