Created
October 23, 2017 14:58
-
-
Save mrf345/428195bdcf0d76c1fa48ad25c1a614ea to your computer and use it in GitHub Desktop.
Function to draw a grid Python3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def quare(leng=4, height=4, hmh=2, hmv=2, counter=1): | |
if counter > hmv: | |
return True | |
def pit(inp, num): | |
print(inp * num) | |
pit("+" + "-" * leng + "+" + " ", hmh) | |
for a in range(height-1): | |
pit("|" + " " * leng + "|" + " ", hmh) | |
pit("+" + "-" * leng + "+" + " ", hmh) | |
return quare(leng, height, hmh, hmv, counter+1) | |
quare() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment