Skip to main content
elearn.ellak.gr
  • Home
  • More
You are currently using guest access
Log in
Home
  1. Open Courses in English
  2. python_ellak_may_2017
  3. Week 3 - May 20
  4. Assignment 3.1
Assignment

Assignment 3.1

Assignment 3.1

Completion requirements
Opened: Saturday, 20 May 2017, 9:55 AM

We have learned how to create code to draw a rectangle, move it and keep it inside the window.

  1. Starting from the code below, for the bouncing rectangle, comment or replace the command that creates the rectangle and create a red circle of 20 pixel radius. The command is already written but commented inside the code in line 65.
  2. Then try to move it changing the static center [200, 140] with the variables rect_x and rect_y.
  3. Correct the values in if commands so the circle stays completely inside the window and bounces at the edges. 

  • bouncing rectangle 2.py bouncing rectangle 2.py
    18 May 2017, 6:55 PM
◄ Bouncing Square
Assignment 3.1 - Answer ►
You are currently using guest access (Log in)
Data retention summary
Get the mobile app
Powered by Moodle