Code Monkey home page Code Monkey logo

final-exam's Introduction

final-exam

  • From the starting code, polygon_art.py, you are to write an OO program that generates different pieces of art works
  • Fork, then, clone this repo
  • Read the instructions given in the course's Google Classroom and start coding
  • Once you are done, push your final code to your Github repo and modify this README to report on the work you have done
  1. Create Polygon Class and set function init(self) to contain the following variable *turtle speed = set speed *turtle bgcolor = set background color *turtle tracer = set tracer *turtle color mode = turtle color mode set to 255 *num sides = random side *size = random size *orientation = random orientation *location = random location *color = random color by calling polygon.get_new_color *border_size *Called Polygon.draw_polygon with contain all previous variables

  2. Create get_new_color function and return 3 random color code each of them max 255

  3. draw_polygon function used the variable from inti to draw a polygon at current position

  4. reposition function we set the reduction_ratio at main and send the following variable to reposition function in polygon class to make it penup and move to random location and continue draw the polygon

  5. about main I create a main that can select that you can choose to random or manual side I didnt do for loop because time is almost up but you can keep spam 1 for random image and get the if 4 in introduction by professor and choice 2 for manual you can get the same side with any amount by same type same side and repeat 2 and for choice 3 I used for exit program

final-exam's People

Contributors

panthutk avatar parujr avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.