How to print an inverted triangle in python

Release: 2019-07-08 09:13:36
Original
13243 people have browsed it

How to print an inverted triangle in python

Inverted triangle in Python can be implemented using a for loop:

for i in range(6):
    print("")
    for j in range(0,6-i):
         print("*",end=" ")
   print("\n")
Copy after login

How to print an inverted triangle in python

For more Python related technical articles, please visit PythonTutorial column to learn!

The above is the detailed content of How to print an inverted triangle in python. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!