About 83,500 results
Open links in new tab
  1. graphics - how do I make a rectangle in python? - Stack Overflow

    Dec 3, 2014 · How do I make a rectangle with Height and Width parameters, using the graphics package in python? Rectangle(RecWidth,RecField);

  2. python - Tkinter Canvas creating rectangle - Stack Overflow

    May 2, 2018 · The create_rectangle method takes 4 coordinates: canvas.create_rectangle(x1, y1, x2, y2, **kwargs), with (x1,y1) the coordinates of the top left corner and (x2, y2) those of the …

  3. How can I make rectangle shape in turtle, python?

    Feb 11, 2015 · I am trying to make game . work like angry birds, so I want to make two rectangle on both side (300,0),(-300,0) and then create two ball to shot so when one player input angle …

  4. python - How to draw a rectangle on image - Stack Overflow

    Here is PIL's ImageDraw method to draw a rectangle. Here is one of OpenCV's methods for drawing a rectangle. Your question asked about Matplotlib, but probably should have just …

  5. Python Nested Loops To Print Rectangle With Asterisks

    Write nested loops to print a rectangle. Sample output for given program: ... Using a nested for loop in ...

  6. python - Printing a rectangle - Code Review Stack Exchange

    Write a program which reads from the keyboard two integers n and m, and a character c from the keyboard. This program should define and call a function: print rectangle(n, m, c) which prints …

  7. python - Marking a rectangular region in a NumPy array as an …

    Nov 2, 2018 · I'm currently working on creating a mask for an image. I have initialized a two-dimensional numpy zeros array. I now want to replace the values of the mask corresponding …

  8. python - Implementing a rectangle class - Code Review Stack …

    Mar 17, 2020 · from typing import NamedTuple from dataclasses import dataclass class Point(NamedTuple): x: float y: float @dataclass class Rectangle: """A class for calculations on …

  9. python - Decide if 4 lengths form a square, rectangle or neither

    Nov 21, 2015 · that is, make one fn whose input is an array of 4 ints and whose output is the type of shape. then use a reduce function to apply that single identification fn over the array, getting …

  10. python - Building Data abstraction and ADT for rectangle using …

    Mar 9, 2015 · Implement a representation for rectangles in a plane. (Hint: You may want to make use of your procedures from exercise 5). Then, in terms of your constructors and selectors, …