Page 117 - 2627_Trackpad Pro_C-8
P. 117
PROJECT NAME: Generate Patterns
Software Used: Python Editor
Objective:
Develop a Python program to generate following patterns using looping statements.
Python Editors:
∑ Pycharm (Desktop IDE)
∑ Google Colab (Cloud-based platform, accessible via school email): https://colab.research.
google.com
Step-by-Step Instructions: (Plan IPO)
Step 1 Input:
Accept the number of rows for the triangle pattern (dynamic-varies with each user).
Step 2 Process:
Use a loop to iterate through each row.
For each row, calculate the number of spaces and asterisks required to align the
triangle
Print the spaces followed by the asterisks for each row.
Step 3 Output:
Display a right-aligned triangle pattern of asterisks. Refer to the sample:
*
* *
* * *
* * * *
Code:
Hands-On Project 115

