About 44,600 results
Open links in new tab
  1. How to make a triangle of x's in python? - Stack Overflow

    How would I write a function that produces a triangle like this: x xx xxx xxxx xxxxx Let's say the function is def triangle(n), the bottom row would have n amount of x's. All I know how to do is …

  2. Making triangles in Python - Stack Overflow

    Sep 18, 2018 · If you are learning Python in 2018, you should definitely be targeting the currently recommended and supported version of the language, which is Python 3. Version 2 was …

  3. How to print a Triangle Pyramid pattern using a for loop in Python ...

    #n=Number of rows def get_triangle(n): space,star=" ","* " for i in range(1,n+1): print((n-i)*space + star*i) get_triangle(5) Where n is the number of rows and I is a variable for the loop, you must …

  4. python - What is the easiest way to make a triangles - Stack …

    Jul 29, 2021 · How to make a triangle using a for loop in Python. 5. Fixing code to make a triangle. 3.

  5. python - For/While Loops to make *-triangles - Stack Overflow

    Dec 6, 2015 · For an assignment in a coding class, I was supposed to find a way to have Python make a triangle of asterisks, looking like this: x xx xxx Whatever I do with my code, however, I …

  6. How to Draw a triangle shape in python? - Stack Overflow

    Apr 22, 2014 · I want to draw the shape of a triangle using python. I have already drawn the shape of circle but I cannot draw the triangle. Could someone please help me with this? This is …

  7. Asterisks Triangle in Python - Stack Overflow

    Nov 6, 2012 · I am trying to create a program that allows me to make a "pyramid" or "triangle" using asterisks, in the Python program. I've already started the code, but can't seem to figure it …

  8. How to make a triangle using a for loop in Python

    Aug 6, 2013 · I'm new to programming and have been experimenting with for loops to try and figure out how to make different shapes however I have encountered a problem that I cannot …

  9. Nested loop code to create right triangle in Python

    Dec 29, 2016 · Professor gave us a simple code that executes a square and we need to add/change the code to output the right triangle shape as shown below. It's just a simple loop …

  10. Python Code for Triangles - Stack Overflow

    Dec 31, 2015 · I have this task to do :Write a procedure called triangle that takes in a number and then prints out a triangle of that height.Like this: * *** ***** ***** The only solution I

Refresh