This Python program reads an integer from the user and prints the string "* 0" in each line using a loop.
The number of lines is determined by the input value.
This exercise helps reinforce basic loop structures and string formatting in terminal output.
def print_star_zero(n):
for i in range(n):
print("* 0")
# Run the program
rows = int(input("Enter number of lines: "))
print_star_zero(rows)
* 0
* 0
* 0
* 0
- The program first reads an integer from the user
- A for loop runs for the specified number of iterations
- In each iteration, the string "* 0" is printed on a new line
- This output combines a symbol and a digit, useful for practicing loop-based string printing