Skip to main content
deleted 14 characters in body
Source Link

Ruby, 164142

f=->x{d='' _     _  _     _  _  _  _  _ 
| |  | _| _||_||_ |_   ||_||_|
|_|  ||_  _|  | _||_|  ||_| _|'
[0,31,62].maplines{|y|puts|l|puts x.chars.map{|i|d[i|i|l[i.to_i*3+yto_i*3,3]}.join}*''}

uses a function forexpects input in the variable x. examples:

f['321']x = '321'
#  _  _    
#  _| _|  |
#  _||_   |

f['42']x = '42'
#      _ 
#  |_| _|
#    ||_ 

Ruby, 164

f=->x{d=' _     _  _     _  _  _  _  _ 
| |  | _| _||_||_ |_   ||_||_|
|_|  ||_  _|  | _||_|  ||_| _|'
[0,31,62].map{|y|puts x.chars.map{|i|d[i.to_i*3+y,3]}.join}}

uses a function for input. examples:

f['321']
#  _  _    
#  _| _|  |
#  _||_   |

f['42']
#      _ 
#  |_| _|
#    ||_ 

Ruby, 142

' _     _  _     _  _  _  _  _ 
| |  | _| _||_||_ |_   ||_||_|
|_|  ||_  _|  | _||_|  ||_| _|'.lines{|l|puts x.chars.map{|i|l[i.to_i*3,3]}*''}

expects input in the variable x. examples:

x = '321'
#  _  _    
#  _| _|  |
#  _||_   |

x = '42'
#      _ 
#  |_| _|
#    ||_ 
Source Link

Ruby, 164

f=->x{d=' _     _  _     _  _  _  _  _ 
| |  | _| _||_||_ |_   ||_||_|
|_|  ||_  _|  | _||_|  ||_| _|'
[0,31,62].map{|y|puts x.chars.map{|i|d[i.to_i*3+y,3]}.join}}

uses a function for input. examples:

f['321']
#  _  _    
#  _| _|  |
#  _||_   |

f['42']
#      _ 
#  |_| _|
#    ||_