scene.org File Archive

File download

<root>­/­parties­/­2023­/­vccc23­/­christmas-diamonds/keyj_pc_python_vc3-2023.zip

File size:
95 068 bytes (92.84K)
File date:
2024-01-03 14:15:18
Download count:
all-time: 2

Preview

  • file_id.diz 875B
  • vc3_23_python2.png 52.47K
  • vc3_23_python2.py 72B
  • vc3_23_python3.png 52.56K
  • vc3_23_python3.py 74B

file_id.diz

KeyJ's Python Weave Pattern

Author:          KeyJ / TRBL
Category:        Christmas Challenge 2023
System:          modern PC
Language:        Python 2 and 3
Len source code: 72 bytes (Python 2.x) / 74 bytes (Python 3.x)
Len exe file:    n/a
Len code only:   n/a

Instructions:
- run with (Linux):
  $ python2 vc3_23_python2.py
  $ python3 vc3_23_python3.py
- run with (Windows):
  > py -2 vc3_23_python2.py
  > py -3 vc3_23_python3.py

Description:
Uses a simple parametric formula: X and Y in, character out. To me, it's
surprising to use a quadratic formula even though the result is just a bunch
of lines, but here we are. Can't argue with maths, I guess.

Comments:
Again, a byproduct of the development of the other versions, sprinkled with
some Python code golf I was doing for Advent of Code.

Python 3 uses 2 extra bytes because "print" requires parentheses there.