This Python program reads an integer from the user, representing the number of lines.
In each line, it prints the '*' character exactly 17 times using a nested loop.
This exercise helps reinforce loop structures and fixed-length pattern printing in Python.
def print_seventeen_stars_per_line(lines):
for i in range(lines):
for j in range(17):
print("*", end="")
print()
# Run the program
lines = int(input("Enter number of lines: "))
print_seventeen_stars_per_line(lines)
*****************
*****************
- The program first reads the number of lines from the user
- The outer loop runs once for each line
- The inner loop prints 17 asterisks per line
- The result is a block of lines, each containing exactly 17 '*' characters