Initial commit
This commit is contained in:
15
Solutions/1_1/art.py
Normal file
15
Solutions/1_1/art.py
Normal file
@@ -0,0 +1,15 @@
|
||||
# art.py
|
||||
|
||||
import sys
|
||||
import random
|
||||
|
||||
chars = '\|/'
|
||||
|
||||
def draw(rows, columns):
|
||||
for r in range(rows):
|
||||
print(''.join(random.choice(chars) for _ in range(columns)))
|
||||
|
||||
if __name__ == '__main__':
|
||||
if len(sys.argv) != 3:
|
||||
raise SystemExit("Usage: art.py rows columns")
|
||||
draw(int(sys.argv[1]), int(sys.argv[2]))
|
||||
Reference in New Issue
Block a user