()
| 4 | |
| 5 | |
| 6 | def start(): |
| 7 | while True: |
| 8 | try: |
| 9 | n = int(input("Enter number of rows: ")) |
| 10 | if n < 1: |
| 11 | print("Invalid value, enter a positive integer.") |
| 12 | continue |
| 13 | break |
| 14 | except ValueError: |
| 15 | print("Invalid input, please enter a number.") |
| 16 | |
| 17 | print_pattern(n) |
| 18 | |
| 19 | |
| 20 | start() |
no test coverage detected