Wednesday, July 23, 2025

How to Print Star (*) Triangle Patterns in Python – For & While Loops Explained



 1. Left-Aligned Right-Angled Triangle


 Using for loop:



Output 






Using while loop:



Output 





No comments:

Post a Comment