mercredi 6 décembre 2023

how to make logic for pattern "*" question in python

Make the pattern

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

using loops in python

There is some problem in the logic of this for loop can u check and please tell

for i in range(0, 5):
     
        for j in range(0, i+1):
         
            print("* ",end=""
)
      
        print("\r")

Aucun commentaire:

Enregistrer un commentaire