Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
pattern question
#1
'''
5 4 3 2 1
5 4 3 2 1
5 4 3 2 1
5 4 3 2 1
5 4 3 2 1
'''
'''I am trying to print the pattern'''
n = int(input("Please enter the number of times "))
for i in range(n):
    for j in range(n, 0 -1):
        print(j, end = " ")
    print()
Output:
Please enter the number of times 3 Process finished with exit code 0
I am not looking for solution but please tell me why is that, it is not printing the output. In regards to solution, I am still working on it.

I made a big time small mistake, Thank you
Reply


Messages In This Thread
pattern question - by spalisetty06 - Jul-24-2020, 10:47 AM
RE: pattern question - by DeaD_EyE - Jul-24-2020, 12:27 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  pattern question spalisetty06 2 2,324 Jul-24-2020, 10:28 AM
Last Post: Gribouillis

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020