About 41,600 results
Open links in new tab
  1. python - How to draw a square inside a square? - Stack Overflow

    Dec 17, 2019 · pink square is the taskI am trying to draw a square inside a square using turtle graphics. I couldn't draw exactly like the original one. Here is my code import turtle win = …

  2. Draw a square in Python Turtle - Stack Overflow

    Jul 14, 2024 · import turtle #acutally called turtle to draw a turtle beautiful also used to draw other stuff # to draw a square or eventually a turtle you need to do this things below # to draw a …

  3. python - Is there a way to draw rectangles and/or squares with ...

    Oct 14, 2021 · I have the following code and would like to draw rectangles or squares in the figure/plot that is created. I was thinking that importing the Rectangle library would help, but so …

  4. python - Drawing a hollow asterisk square - Stack Overflow

    May 11, 2017 · In this code, there are 2 for loops and this loops will create edges. And "else statements" represents if our point is not on the edge code will print empty character(" "). "i == …

  5. python - How can I draw a bunch of squares? - Stack Overflow

    May 27, 2015 · for col in range(8): for row in range(8): # draw a square here Now, you already wrote yourself the function to draw a square, the only problem is that you would need to draw …

  6. Draw a square using for loops in python? - Stack Overflow

    import turtle def Draw_turtle(my_turtle): for i in range(1,5): my_turtle.turtle.forward(100) my_turtle.turtle.right(90) window = turtle.Screen() window.bgcolor('

  7. python: simple square grid - Stack Overflow

    Mar 20, 2019 · This is a code for drawing a simple grid in python of variable width, height and number of units in a grid ...

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

    There is no need for subplots, and pyplot can display PIL images, so this can be simplified further: import matplotlib.pyplot as plt from matplotlib.patches import Rectangle from PIL import Image …

  9. draw - Drawing a square on python turtle - Stack Overflow

    Oct 30, 2020 · I need your help. I have a silly python exercise that I can't solve because I'm a beginner. I am working on python 3.7. My teacher asks me to propose a programme that …

  10. Drawing a square with "." and " " only in Python - Stack Overflow

    Mar 10, 2017 · I am trying to make a square with spaces and dots only, but I am having an issue. I need to make the code in that way, so I can change the size of the square in just 1 input for …

Refresh