Last active
July 6, 2021 09:16
-
-
Save dfinke/7ec1177ecfe305d4456d56a96ce1ccee to your computer and use it in GitHub Desktop.
The Shining carpet pattern program
This file contains 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
<# | |
Orginal Python: https://twitter.com/AlSweigart/status/1411893003157913603 | |
#> | |
function Show-Carpet { | |
param( | |
$X = 6, # How many times to tessellate horizontally. | |
$Y = 4 # How many times to tessellate vertically. | |
) | |
1..$Y | ForEach-Object { | |
'_ \ \ \_/ __' * $X | |
' \ \ \___/ _' * $X | |
'\ \ \_____/ ' * $X | |
'/ / / ___ \_' * $X | |
'_/ / / _ \__' * $X | |
'__/ / / \___' * $X | |
} | |
} |
Author
dfinke
commented
Jul 5, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment