Question: Write a program to draw a triangle by using numbers as shown in the examples below. Take number N from the user as shown
Write a program to draw a triangle by using numbers as shown in the examples below. Take number N from the user as shown in the example. In the first example, user enters number 4. Your program draws a triangle with height of 4. If the user enters number 5, your program draws a triangle with height of 5. Observe the order of the numbers in the triangle drawing. Your solution must be in that order. You must use nested loops to solve this question. Only using display function to print the numbers without using nested loops will be graded as zero. Example run output 1: Enter a number: 4 4 43 432 4321
Step by Step Solution
3.35 Rating (158 Votes )
There are 3 Steps involved in it
Sure Heres a Python program that draws a triangle using numbers based on the users input python def ... View full answer
Get step-by-step solutions from verified subject matter experts
