0

Why this code output nothing? (code in despcription) I am trying to get a inverted star pattern that is from many stars to less

a = "*" i = 20 for i in range(21,1) : i = i - 1 print(a*i)

18th Apr 2021, 6:17 AM
Shlok Jathar
Shlok Jathar - avatar
1 Réponse
+ 5
You need to add the step to countdown in range(21, 1, -1) otherwise the for loop isn't entered. You can then remove the lines i = 20 i = i - 1
18th Apr 2021, 6:26 AM
ChaoticDawg
ChaoticDawg - avatar