Python Forum

Full Version: Need Help
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
 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
Is that actually the full description of the task? It looks like it's just a part of a full description...
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.
[Image: 2ooxsh.jpg]
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