About 22,800 results
Open links in new tab
  1. Categorizing Triangles - Overview - CodeHS

    Turtle Graphics in Python will be used to draw a triangle and write text to the screen. Computer science concepts such as if/else statements, variables, functions, and mathematical, logical, and comparison operators will be used to print the resulting triangle category.

  2. Python Turtle Triangle + Examples - Python Guides

    Oct 27, 2021 · In this section, we will learn how to draw a triangle in a Python turtle. A triangle has three edges and three vertices. It is a closed, two-dimensional shape. Code: In the following code, we import the turtle module. This turtle () method is generally used to make objects. tur.forward (100) is used to move the turtle in the forwarding direction.

  3. Documentation - Python (turtle) - CodeHS

    # This command will draw a semi-circle circle(10, 180) # This command will draw a quarter-circle circle(10, 90) An additional parameter can be used to control the number of points in the shape # This command will draw a triangle circle(10, 360, 3) …

  4. Drawing a Custom Triangle - CodeHS

    This program will draw a triangle with a static base value. The third point in the triangle will be given by the user. The triangle will be drawn using these points and the base and height will be labeled. Read the comments throughout the code (text in green) to see what each function is completing. Explore This Example!

  5. CodeHS 3.9.5 - 4 Triangles - YouTube

    Our goal is to draw four triangles in a row, making sure that: 1. Each side has a different color: red, blue, and green. 2. that Each side is 50 pixels long, 3. that the drawing is centered...

  6. How to code 2.9.5: Four colored triangles [Code HS] - Brainly.com

    Sep 30, 2020 · To draw four colored triangles with turtle graphics, set up your environment, position the pen, and use a loop to draw each triangle with different colors. Adjust the angles and colors as desired for variety. Always include penup() and pendown() commands to control when to draw and when to move without drawing.

  7. 4.4.5: Triangle Class: Constructor - GitHub

    public class Triangle { private double height; private double width; // Write your constructor here! public Triangle (double iheight, double iwidth) { height = iheight; width = iwidth; } public String toString () { return "Triangle with width: " + width + " and height: " + height; } } ______________________________________________...

  8. Four colored triangles help plz. : r/codehs - Reddit

    Oct 28, 2021 · You'll need a function, so make one called draw_triangle(). To make a function, just use the keyword def before the function name. You'll make the triangle inside this function.

  9. CodeHS-Python/FourColoredTriangles.py at main - GitHub

    Tracy is drawing 4 triangles, which means that 2 should be left of center and 2 should be right of center. Each triangle has a width of 50. This should help you figure out where to place Tracy to center your triangles!

  10. Categorizing Triangles - Demos - CodeHS

    You'll first need to decide how to determine the x and y values that will create the following types of triangles with a changing base value: * Obtuse Triangle (one angle larger than 90 degrees) * Right Triangle (one angle equal to 90 degrees) * Equilateral Triangle (all angles and side lengths equal) * Acute Triangle (all angles less than 90 ...

  11. Some results have been removed
Refresh