Python line output of the multiplication table display cycle exercise triangular 200308

Functional goals

First, the output of such a shape


*
**
***
****
*****

  • important point

The first line of a playing symbol
second row hit two symbol
n-th line n play symbols

Code implementation

Step by step to complete the following functions:

  • print function to print the contents do not wrap
  • A control loop, printing 5 symbols in a row. To print a total of two lines.
  • 5 symbols printed by the function package
  • Function parameter tape, the plurality of print any symbol
  • The numerals between the newline character ends of each row
  • Replace the symbol is in the form of a * b
  • Find out the results
Published 64 original articles · won praise 1 · views 819

Guess you like

Origin blog.csdn.net/whalecode/article/details/104733160