Question: Assignment 3 A: Pattern Generator Write a Python program that prompts the user for a positive integer and prints a pyramid pattern with numbers. Instructions:

Assignment 3A: Pattern Generator
Write a Python program that prompts the user for a positive integer and prints a pyramid pattern
with numbers.
Instructions:
1. Prompt the user for a positive number
2. Print out as many rows as that positive number indicates. For example, if the user enters
4, you'll print out 4 rows of numbers. If the user enters 15, you'll print out 15 rows of
numbers.
3. Each row should be made up of numbers counting from 1 left to right. Each row should
have exactly as many numbers on it as the row number. For example, row 1 will have 1
number, row 4 will have 4 numbers.
Sample Output:
[Note: Your program must work for any number entered]
Enter a positive number: 2
1
23
Enter a positive number: 4
1
23
456
78910

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!