MCPcopy Create free account
hub / github.com/geekcomputers/Python / start

Function start

To print series 1,12,123,1234......py:6–17  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4
5
6def 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
20start()

Calls 1

print_patternFunction · 0.85

Tested by

no test coverage detected