Skip to main content
changed all of <strike> and </strike> to <s> and </s>
Source Link
micsthepick
  • 411
  • 5
  • 15

Python 2, 156156 151151 147147 141141 139

edit 1: edited to use input() instead of a function.

edit 2: used str.join and added to var c to remove some redundant characters.

edit 3: removed some unnecessary string escape sequences.

edit 4: used ~-n instead of a=n-1

This was good fun to program, my first code golf!

n=input() a='/\/ '*~-n b='\ '+'\/\ '*~-n+'\\' c='\n| '+a+'/\ |\n| \/ '+a+'|' print'\n '.join((' __'*n,'/ \\'*n+c,b+'/','/'+b+c,'\__/'*n)) 

save it in an external text editor as n.py in order to remove last newline character in order to reduce file size by 1 byte, run the module, and input your number.

Python 2, 156 151 147 141 139

edit 1: edited to use input() instead of a function.

edit 2: used str.join and added to var c to remove some redundant characters.

edit 3: removed some unnecessary string escape sequences.

edit 4: used ~-n instead of a=n-1

This was good fun to program, my first code golf!

n=input() a='/\/ '*~-n b='\ '+'\/\ '*~-n+'\\' c='\n| '+a+'/\ |\n| \/ '+a+'|' print'\n '.join((' __'*n,'/ \\'*n+c,b+'/','/'+b+c,'\__/'*n)) 

save it in an external text editor as n.py in order to remove last newline character in order to reduce file size by 1 byte, run the module, and input your number.

Python 2, 156 151 147 141 139

edit 1: edited to use input() instead of a function.

edit 2: used str.join and added to var c to remove some redundant characters.

edit 3: removed some unnecessary string escape sequences.

edit 4: used ~-n instead of a=n-1

This was good fun to program, my first code golf!

n=input() a='/\/ '*~-n b='\ '+'\/\ '*~-n+'\\' c='\n| '+a+'/\ |\n| \/ '+a+'|' print'\n '.join((' __'*n,'/ \\'*n+c,b+'/','/'+b+c,'\__/'*n)) 

save it in an external text editor as n.py in order to remove last newline character in order to reduce file size by 1 byte, run the module, and input your number.

added 51 characters in body
Source Link
micsthepick
  • 411
  • 5
  • 15

Python 2, 156 151 147 141141 139

edit 1: edited to use input() instead of a function.

edit 2: used str.join and added to var c to remove some redundant characters.

edit 3: removed some unnecessary string escape sequences.

edit 4: used ~-n instead of a=n-1

This was good fun to program, my first code golf!

n=input() a=n-1 b='a='/\/ '*a'*~-n c='\b='\ '+'\/\ '*a+'\\''*~-n+'\\' d='\n|c='\n| '+b+''+a+'/\ |\n| \/ '+b+'|''+a+'|' print'\n '.join((' __'*n,'/ \\'*n+d\\'*n+c,c+'b+'/','/'+c+d'+b+c,'\__/'*n)) 

save it in an external text editor as n.py in order to remove last newline character in order to reduce file size by 1 byte, run the module, and input your number.

Python 2, 156 151 147 141

edit 1: edited to use input() instead of a function.

edit 2: used str.join and added to var c to remove some redundant characters.

edit 3: removed some unnecessary string escape sequences.

This was good fun to program, my first code golf!

n=input() a=n-1 b='/\/ '*a c='\ '+'\/\ '*a+'\\' d='\n| '+b+'/\ |\n| \/ '+b+'|' print'\n '.join((' __'*n,'/ \\'*n+d,c+'/','/'+c+d,'\__/'*n)) 

save it in an external text editor as n.py in order to remove last newline character in order to reduce file size by 1 byte, run the module, and input your number.

Python 2, 156 151 147 141 139

edit 1: edited to use input() instead of a function.

edit 2: used str.join and added to var c to remove some redundant characters.

edit 3: removed some unnecessary string escape sequences.

edit 4: used ~-n instead of a=n-1

This was good fun to program, my first code golf!

n=input() a='/\/ '*~-n b='\ '+'\/\ '*~-n+'\\' c='\n| '+a+'/\ |\n| \/ '+a+'|' print'\n '.join((' __'*n,'/ \\'*n+c,b+'/','/'+b+c,'\__/'*n)) 

save it in an external text editor as n.py in order to remove last newline character in order to reduce file size by 1 byte, run the module, and input your number.

147 - 141
Source Link
micsthepick
  • 411
  • 5
  • 15

Python 2, 156 151 147147 141

edit 1: edited to use input() instead of a function.

edit 2: used str.join and added to var c to remove some redundant characters.

edit 3: removed some unnecessary string escape sequences.

This was good fun to program, my first code golf!

n=input() a=n-1 b='/\\\/ '*a c='\\c='\ '+r'\'+'\/\ '*a+'\\' d='\n| '+b+'/\\\ |\n| \\\/ '+b+'|' print'\n '.join((' __'*n,'/ \\'*n+d,c+'/','/'+c+d,'\\__'\__/'*n)) 

save it in an external text editor as n.py in order to remove last newline character in order to reduce file size by 1 byte, run the module, and input your number.

Python 2, 156 151 147

edit 1: edited to use input() instead of a function.

edit 2: used str.join and added to var c to remove some redundant characters.

This was good fun to program, my first code golf!

n=input() a=n-1 b='/\\/ '*a c='\\ '+r'\/\ '*a+'\\' d='\n| '+b+'/\\ |\n| \\/ '+b+'|' print'\n '.join((' __'*n,'/ \\'*n+d,c+'/','/'+c+d,'\\__/'*n)) 

save it in an external text editor as n.py in order to remove last newline character in order to reduce file size by 1 byte, run the module, and input your number.

Python 2, 156 151 147 141

edit 1: edited to use input() instead of a function.

edit 2: used str.join and added to var c to remove some redundant characters.

edit 3: removed some unnecessary string escape sequences.

This was good fun to program, my first code golf!

n=input() a=n-1 b='/\/ '*a c='\ '+'\/\ '*a+'\\' d='\n| '+b+'/\ |\n| \/ '+b+'|' print'\n '.join((' __'*n,'/ \\'*n+d,c+'/','/'+c+d,'\__/'*n)) 

save it in an external text editor as n.py in order to remove last newline character in order to reduce file size by 1 byte, run the module, and input your number.

changed to say reduce by one byte instead of from x to x-1
Source Link
micsthepick
  • 411
  • 5
  • 15
Loading
Syntax highlight code.
Source Link
xnor
  • 149.7k
  • 26
  • 287
  • 676
Loading
show python version
Source Link
micsthepick
  • 411
  • 5
  • 15
Loading
changed to use input()
Source Link
micsthepick
  • 411
  • 5
  • 15
Loading
Saved one character
Source Link
micsthepick
  • 411
  • 5
  • 15
Loading
added 27 characters in body
Source Link
micsthepick
  • 411
  • 5
  • 15
Loading
Source Link
micsthepick
  • 411
  • 5
  • 15
Loading