Posts

Showing posts with the label Triangle Program in Python

Triangle Program in Python

Print the Triangle in stars( * ) using Python... Output:        *        * *       * * *      * * * *     * * * * *    * * * * * *   * * * * * * *  Program: for python 3... n = 7 for i in range(n):          for j in range(0,n):         print(end=" ")     n = n-1         for k in range(0,i+1):         print("*",end=" ")     print("\r") ------------------------------------------------------------------------------------ Right hand triangle in numbers( 0-9 ) using python... Output: 1 22 333 4444 55555 666666 7777777 88888888 999999999 Program: for python 3... n = 9 k = 1 for i in range(n):     for j in range(0,i+1):         print(k...