Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need Help
#1
 The number of rows must be between 11 and 20 and the The result will appear in the console output as indicated in the figure. If the user enters a value less than 11 rows, adjust the value from rows to 11. If the user enters a value greater than 20, adjust the value of rows to 20.

start = 12 
for i in range(start):
    print(*('.' for j, x in enumerate(range(1, start + 1))), sep='')
Output:
My Output ............ ............ ............ ............ ............ ............ ............ ............ ............ ............ ............ ............
Output:
Expected OUTPUT ..........1 .........232 ........34543 .......4567654 ......567898765 .....67890109876 ....7890123210987 ...890123454321098 ..90123456765432109 .0123456789876543210 123456789010987654321
Please help
Reply
#2
Is that actually the full description of the task? It looks like it's just a part of a full description...
Reply
#3
The number of rows must be between 11 and 20 and the The result will appear in the console output as indicated in the figure. If the user enters a value less than 11 rows, adjust the value from rows to 11. If the user enters a value greater than 20, adjust the value of rows to 20.
Reply
#4
[Image: 2ooxsh.jpg]
Reply
#5
Could someone help me to get required output?

The number of rows must be between 11 and 20 and the The result will appear in the console output as indicated in the figure. If the user enters a value less than 11 rows, adjust the value from rows to 11. If the user enters a value greater than 20, adjust the value of rows to 20.
Output:
Expected OUTPUT ..........1 .........232 ........34543 .......4567654 ......567898765 .....67890109876 ....7890123210987 ...890123454321098 ..90123456765432109 .0123456789876543210 123456789010987654321
Reply


Forum Jump:

User Panel Messages

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