Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 100 - 2615_KEC
P. 100

    PROJECT 5: 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:

                       98   Premium Edition-VIII

| 95 96 97 98 99 100 101 102 103 104 105 |