65
\$\begingroup\$

Introduction

Bad news guys - you got detention. Your English teacher doesn't understand this site and wants you to "stop doing math on your digital dohickeys, this is English class!"

She sentenced you to write her favorite saying on the blackboard 25 times, which will give a total of 100 lines on the blackboard.

The eighteen-hundreds were a time for rum.
The nineteen-hundreds were a time for fun.
The two-thousands are a time to run
a civilized classroom.

Lucky for you, you are an avid reader (not to mention an expert code-golfer)! You have a read about a trick that might possibly get you off easy.

foxtrot

(Foxtrot by Bill Amend)

Unfortunately for Jason, it didn't work out. But you have a better idea! Since your English teacher thinks you're doing math, if you leave all the numbers out of your program it just might work! You also want to keep your program as short as possible because you are a lazy student and don't want to write a lot on the board.

Write a program that complies with the following rules:

  • Your program must print the 4 above lines 25 times. The lines must be outputted in that order, repeating. Total exactly 100 lines of output (a trailing newline at the very end or a leading newline at the very beginning is okay).
  • You cannot use the characters 0123456789. Your teacher gets confused by math and will call you out!
  • You can use any imports and external libraries without counting the imports. Your English teacher doesn't know about programming. Jason could have saved a lot of work by not writing #include <stdio.h> and you don't want to make his same mistakes!
  • Score your program by byte count. Lowest score wins!
\$\endgroup\$
9
  • 2
    \$\begingroup\$ If the text would've read "1900s", writing the output would've been slightly more tricky. \$\endgroup\$
    – Ingo Bürk
    Oct 23, 2014 at 14:50
  • 30
    \$\begingroup\$ to the comix: he's not printing \n's, and the loop from 1 is pretty awkward (like against C nature)... \$\endgroup\$
    – V-X
    Oct 23, 2014 at 15:41
  • 12
    \$\begingroup\$ @V-X Bill Amend is a long-time Pascal die-hard, and whenever he writes C that becomes pretty apparent. \$\endgroup\$
    – fluffy
    Oct 23, 2014 at 18:09
  • 5
    \$\begingroup\$ This sounds very much like one of my old English teachers. \$\endgroup\$
    – Kaz Wolfe
    Oct 25, 2014 at 16:58
  • 2
    \$\begingroup\$ Banning + would have made sense here, but maybe that would have been too difficult. \$\endgroup\$
    – Pharap
    Oct 28, 2014 at 9:38

63 Answers 63

1 2
3
1
\$\begingroup\$

Forth (gforth), 174 bytes

: x ." teen-hundreds were a time for ";
: f bl true cell+ do ." The eigh"x .\" rum.\nThe nine"x .\" fun.\nThe two-thousands are a time to run\na civilized classroom.\n"loop ;

Try it online!

Code Explanation

: x                                      \ start a new word definition
  ." teen-hundreds were a time for "     \ outputs "teen-hundreds were a time for "
;                                        \ end word definition

: f                                      \ start a new word definition
  bl                                     \ ascii value of space (32)
  true cell+                             \ true (-1) + size of cell (8 in 64-bit) = 7
  do                                     \ counted loop from 7 to 31 (total of 25)
    ." The eigh"x                        \ output "The eigh" and call x
    .\" rum.\nThe nine"x                 \ output "rum\nThe nine" and call x              
    .\" fun.\nThe two-thousands are a time to run\na civilized classroom.\n" \ output the rest
  loop                                   \ end loop
;                                        \ end word definition
\$\endgroup\$
1
\$\begingroup\$

EXCEL , 160 164 bytes

asked Teacher if I could use Excel, Teacher said Yes.

asked Teacher if I could click around, Teacher said Yes.

So click Wrap Text, merge A-TwentyFive to A-OneHundredTwentyFive and Paste this in Cell A-TwentyFive

=REPT("The eighteen-hundreds were a time for rum.
The nineteen-hundreds were a time for fun.
The two-thousands are a time to run
a civilized classroom.
",ROW())
\$\endgroup\$
2
  • \$\begingroup\$ I count this as 164, did I miss something? \$\endgroup\$
    – Origin
    Apr 16, 2019 at 8:18
  • \$\begingroup\$ I'm using TIO to count the bytes of my code. are you referring to the New Line? maybe its not counting it. will add it. Thank you :) \$\endgroup\$
    – remoel
    Apr 16, 2019 at 8:41
0
\$\begingroup\$

Zsh, 136 bytes

repeat \##� <<.
The eigh${A=teen-hundreds we${B=re a time} for} rum.
The nine$A fun.
The two-thousands a$B to run
a civilized classroom.

Attempt This Online!

The represents ASCII 0x19 = 25.

\$\endgroup\$
1 2
3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.