51
\$\begingroup\$

Create a program which prints the amount of characters its source has in English words.

If your program is nine letters long it should print "nine".

Capitalization is ignored: in case you're printing "one" (somehow) you can print "one", "oNe", "ONE" or anything else.

Base ten is required.

Proper spacing is also required.

In the (unlikely but just for specification) case your program reaches one billion characters or more, use the American number scale. A billion here is 10^9 and a million is 10^6.

Do not use "one hundred and one": use "one hundred one".

Do not use the hyphen. Print forty four, not forty-four.

Test cases with a fake program:

10.(96 0s later)..01 prints one HuNdreD ONE -- okay: proper spacing, no "and"
10.(96 0s later)..01 prints one HuNdreDONE -- not okay: wrong spacing
10.(96 0s later)..01 prints one thousand two hundred two -- not okay: base 3 rather than base 10
10...(999999996 0s later) prints nine hundred ninety-nine million nine hundred ninety-nine thousand nine hundred ninety-six: not okay, wrong number and includes hyphens

Golfy challenge, as always: shortest code wins. You're free to post after the green tick has been given, though. This serves more for completeness for hard to program languages. Malbolge, anyone?

\$\endgroup\$
2
  • 1
    \$\begingroup\$ Proper spacing is also required. Does this mean no trailing spaces in the output? \$\endgroup\$ Commented Oct 23, 2019 at 12:14
  • \$\begingroup\$ To solve it in Unary, is there a list of larger units? \$\endgroup\$
    – l4m2
    Commented Jan 21, 2022 at 12:59

128 Answers 128

1
2 3 4 5
67
\$\begingroup\$

Poetic, 400 bytes

Type fourhundred chars? I say, I think I have an angle.
I say "Gosh, could I just go create some poem? Clearly it comes a long way, writing stuff I say."
I compose the entire written poem, and someone reads a tiny, tiny portion.
"Surely, it all is garbage," cried a big fat crybaby.
Would HE frankly notice how many long, tedious hours I took?
The crybaby whined a lot. I watched, then I ignored him.

Try it online!

Prints Four HunDrED. (I tried to make it print some number in the 300s, but I can't seem to do so in under 400 bytes.)

Poetic is an esolang I made in 2018 for a class project. It's basically brainfuck with word-lengths instead of symbols.

\$\endgroup\$
2
  • 7
    \$\begingroup\$ Clearly it comes a long way, writing stuff I say. Beautiful poem, have a +1. \$\endgroup\$
    – user85052
    Commented Oct 20, 2019 at 1:56
  • 3
    \$\begingroup\$ @A_ Thanks, it's always fun to create coherent sentences based on pre-determined word lengths. \$\endgroup\$ Commented Oct 20, 2019 at 2:01
38
\$\begingroup\$

Google Translate (3 bytes)

Try it online!

It's the Chinese character for "one" (matching the number of characters in the source code), though the score's due to the character itself being 3 bytes.


Google Translate (3 bytes)

tre

Try it online!

It's Italian for "three".

\$\endgroup\$
6
  • 3
    \$\begingroup\$ You can add a &tl=en at the end of your URLs to force it to show in English. My Google translate was set to English to Persian from a previous translation and after opening your links, it was showing the resulting numbers in Persian :P Here is also a 2 chars version, converting Persian دو to English Two. \$\endgroup\$
    – Night2
    Commented Oct 20, 2019 at 13:59
  • 3
    \$\begingroup\$ ...also (Latin-ised) Hindi "do". \$\endgroup\$ Commented Oct 20, 2019 at 22:11
  • 2
    \$\begingroup\$ and albanian dy \$\endgroup\$
    – user46167
    Commented Oct 20, 2019 at 22:36
  • 2
    \$\begingroup\$ to is Norwegian and Danish for two (and we also say tre for three). Google translate doesn't autodetect that one, though. \$\endgroup\$
    – Arthur
    Commented Oct 21, 2019 at 16:17
  • 4
    \$\begingroup\$ insert obligatory "google translate isnt a programming language" complaint \$\endgroup\$
    – des54321
    Commented Apr 16, 2022 at 18:44
35
\$\begingroup\$

brainfuck, 40 bytes

+[+++++>++<]>.+++++++++.+++.++.+++++.+++

Try it online!

The last three characters don't actually do anything useful, but it's easier to output forty than thirty seven.

The ascii code for f is 102, which is 2/5 of 255, found by the initial loop. After that, all the characters in the output just happen to be in ascending alphabetical order.

\$\endgroup\$
4
  • \$\begingroup\$ Whoops, I don't know why I was trying to use different cells for each letter... Nice \$\endgroup\$ Commented Oct 19, 2019 at 18:46
  • \$\begingroup\$ @HiddenBabel Thanks. forty turned out really well. I think for NINETY the optimum would be one cell for NNTY and one cell for IE \$\endgroup\$ Commented Oct 20, 2019 at 2:16
  • \$\begingroup\$ So I guess you already looked for thirty with one cell for trty and one for hi? I can't find a singular loop that will set both of them close by. \$\endgroup\$ Commented Oct 20, 2019 at 2:33
  • 6
    \$\begingroup\$ Indeed, forty is the only number whose letters are in ascending alphabetical order. \$\endgroup\$
    – Neil
    Commented Oct 20, 2019 at 9:45
30
\$\begingroup\$

MathGolf, 2 bytes

Well, MathGolf has a string compression library that seems to compress "two" to 1 byte. You need a command to decompress this.

╩_

Try it online!

\$\endgroup\$
3
  • 8
    \$\begingroup\$ Now we're looking for a language where there's a 1-char command that prints one, or where the empty program prints zero. That's going to be interesting. \$\endgroup\$ Commented Oct 19, 2019 at 14:03
  • 1
    \$\begingroup\$ @Nat MathGolf can use Code Page 437, in which is one byte (0xCA) \$\endgroup\$ Commented Oct 20, 2019 at 20:39
  • 3
    \$\begingroup\$ @Nat MathGolf has a built-in dictionary, the first 256 words of which can be accessed using followed by one byte. The word at index 95 (the code point for _) is "two", so "two" is pushed to the stack and implicitly printed when the program exits. (I think, I haven't used MathGolf) \$\endgroup\$ Commented Oct 20, 2019 at 21:25
17
\$\begingroup\$

Python 3, 15 bytes

exit("fifteen")

...prints to STDERR.

Try it online! (see the "debug" panel)

\$\endgroup\$
3
  • 2
    \$\begingroup\$ I had print('sixteen'), you win :) \$\endgroup\$
    – Jylo
    Commented Oct 22, 2019 at 6:52
  • 1
    \$\begingroup\$ print'ten', in Python 2? \$\endgroup\$
    – JuanCa
    Commented Oct 22, 2019 at 19:47
  • 1
    \$\begingroup\$ @JuanCa yes \$\endgroup\$ Commented Oct 22, 2019 at 20:05
17
\$\begingroup\$

COW, 800 bytes

MoO!!
MoO MoO!!
MoO MoO MoO!!
MoO MoO MoO MoO!!
MoO MoO MoO MoO MoO!!
MoO MoO MoO MoO MoO MoO!!
MoO MoO MoO MoO MoO MoO MoO!!
MoO MoO MoO MoO MMM MoO MoO MoO!!
MoO MoO MoO MoO MoO MoO MoO MoO MoO!!
MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO!!
MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO!!
MoO MoO MoO MoO Moo MoO MoO MoO MoO Moo MOo MOo!!
Moo MoO Moo MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO!!
MoO MoO Moo MMM Moo MoO MoO MoO MoO MoO MoO MoO MoO MoO!!
MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO!!
MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO!!
Moo MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO Moo MOo MOo!!
MOo MOo MOo MOo MOo Moo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo Moo MMM!!
MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO Moo MMM MoO Moo MOo Moo!

Try it online!

Prints EIGHT HUNDRED

\$\endgroup\$
2
  • 4
    \$\begingroup\$ I think ONE THOUSAND is expected. \$\endgroup\$
    – user85052
    Commented Oct 20, 2019 at 8:08
  • 1
    \$\begingroup\$ @A_ EIGHT HUNDRED then! Mooooo! \$\endgroup\$
    – Night2
    Commented Oct 20, 2019 at 8:47
16
\$\begingroup\$

CSS, 30 bytes

body::after{content:'thirty';}


CSS (Google Chrome only), 26 bytes

This should be saved in an empty file between <style> and </style> tag, doesn't work on FireFox or Stack Exchange's code snippets. Tested on Windows Chrome 77.

:after{content:'twenty six
\$\endgroup\$
1
  • 1
    \$\begingroup\$ Never would have thought of this one: +1 \$\endgroup\$
    – rydwolf
    Commented Oct 19, 2019 at 13:44
15
\$\begingroup\$

PHP, 4 bytes

four

Try it online!


PHP, 9 bytes

<?= nine;

Try it online!

\$\endgroup\$
1
  • 6
    \$\begingroup\$ Your first example also works with cat. (The unix command, not the animal.) \$\endgroup\$
    – Florian F
    Commented Sep 23, 2020 at 10:54
15
\$\begingroup\$

Malbolge, 40 bytes

(CB%#9]~}5:3Wyw/4-Qrqq.'&Jkj(h~%|Bd.-==;
\$\endgroup\$
2
  • 6
    \$\begingroup\$ Is it possible to add a code break-down, or if you can't say how it works then how it was produced? \$\endgroup\$ Commented Oct 22, 2019 at 8:55
  • \$\begingroup\$ There exists a certain Malbolge generator. It is very useful in generating short Malbolge code. :) \$\endgroup\$ Commented Oct 22, 2019 at 22:26
12
\$\begingroup\$

Labyrinth, 10 bytes

84.69.78.@

Try it online!

How?

  - initially the main stack contains infinite zeros    [0,0,0,...]
8 - multiply the top of the stack by ten and add eight  [8,0,0,...]
4 - multiply the top of the stack by ten and add four   [84,0,0,...]
. - pop, mod 256, print character                       T
6 - multiply the top of the stack by ten and add six    [6,0,0,...]
9 - multiply the top of the stack by ten and add nine   [69,0,0,...]
. - pop, mod 256, print character                       E
7 - multiply the top of the stack by ten and add seven  [7,0,0,...]
8 - multiply the top of the stack by ten and add eight  [78,0,0,...]
. - pop, mod 256, print character                       N
@ - exit
\$\endgroup\$
3
  • 15
    \$\begingroup\$ As an IP address range this answer geolocates to the United Kingdom with Vodafone wireless broadband. \$\endgroup\$
    – Purple P
    Commented Oct 19, 2019 at 16:38
  • \$\begingroup\$ @PurpleP Ha ha awesome. \$\endgroup\$ Commented Oct 19, 2019 at 16:42
  • 5
    \$\begingroup\$ @PurpleP First thing I thought of when seeing this answer (IP address, not UK Vodafone) \$\endgroup\$
    – rydwolf
    Commented Oct 19, 2019 at 19:18
11
\$\begingroup\$

Piet, 90 codels

enter image description here

Try it online!

In pseudo-code:

The characters are pushed onto stack. To save space, their ASCII values minus 100 are stored. When the string is built, a loop pops, adds 100 to, and prints each character to STDOUT.

    ; Place sentinel 0 on stack
    push 1
    not

    ; Place 21 (y) on stack
    push 7
    push 3
    mul

    ; Place 16 (t) on stack
    push 4
    dup
    mul

    ; Place 1, 10, 5, 10 (e, n, i, n) on stack
    push 1
    push 10
    push 5
    push 10

    ; Check if top of stack is non-zero
    ; Place a 1 if it is, a 0 otherwise
    dup
    not
    not

write_loop:
    ; Turn DP (Direction Pointer) as many steps
    ; clock-wise as value on top of stack
    ; If we had a zero on stack, we continue into
    ; the yellow area and get trapped, ending execution
    pointer

    ; If not, we continue
    ; Add 100 to top of stack
    push 5
    push 4
    push 5
    mul
    mul
    add

    ; Pop and print character
    outc

    ; Turn DP one step to the right
    push 1
    pointer

    dup
    not
    not

    ; Check if top of stack is non-zero
    ; Place a 1 if it is, a 0 otherwise
    dup
    not
    not

    ; We're now back at beginning of the writing loop, sort of like a jmp write_loop
\$\endgroup\$
4
  • \$\begingroup\$ How many bytes is this? \$\endgroup\$
    – Jo King
    Commented Oct 22, 2019 at 22:56
  • 4
    \$\begingroup\$ @JoKing Depends on the fileformat for the image, which is why Piet is generally counted in codels. \$\endgroup\$
    – gastropner
    Commented Oct 22, 2019 at 23:24
  • \$\begingroup\$ Yes, but this is code-golf, so it is measured in bytes \$\endgroup\$
    – Jo King
    Commented Oct 22, 2019 at 23:29
  • 2
    \$\begingroup\$ @JoKing That is curious. I have not seen that comment on any other Piet answers. \$\endgroup\$
    – gastropner
    Commented Oct 22, 2019 at 23:36
10
\$\begingroup\$

Emoji, 18 bytes

⛽eighteen🚘➡

Try it online!


Emoji, 8 chars

⛽eight🚘➡

Try it online!

\$\endgroup\$
1
  • 10
    \$\begingroup\$ ⛽🚘➡ ...gasoline makes the car go? \$\endgroup\$ Commented Oct 21, 2019 at 17:11
10
\$\begingroup\$

Piet + ascii-piet, 40 bytes (3×14=42 codels)

ttllldabknmEmqusbeeeeeute_rbacqtuljvff ?

Try Piet online!

Prints FORTY. A fantastic use case of a white trap :) Also I like the fact that the program is packed so perfectly.

How it works

A classic 3-row layout with a 1 DP+ at the left edge.

Commands        Stack
2 3 dup dup *   [2 3 9]
dup dup 1 - *   [2 3 9 72]
2 -             [2 3 9 70]   Setup the stack so that repeatedly adding and
                             printing gives FORT
dup outC + dup outC +
dup 1 DP+ outC + dup outC
                [84]   Print FORT, turning right at R2C1
>               [84]   No-op (stack underflow) to take care of the crossing
5 + outC        []     Finally print Y

Piet + ascii-piet, 50 bytes (4×13=52 codels)

ttttliametf M tt iillldedMnjlvjcfll i Mkmuuljcbjjj

Try Piet online!

Prints fifty. Not sure if I can do 40, but I guess pretty much unlikely.

How it works

The execution path: First row -> (turn right) -> 3rd-to-last column -> (turn right) -> last row in reverse -> (turn right twice) -> 3rd row -> transfer to 2nd row at the red 5 block -> end.

...>>>>>>>v X
 .. ....>>+>X
>>>>>>>.. v X
^<<<<<<<<..

Commands:

Commands          Stack
6 dup 3 * 1 - *   [102]   Push 102 ('f')
dup outC          [102]   Print 'f'
dup 3 + outC      [102]   Print 'i' (= 'f' + 3)
dup outC          [102]   Print 'f'
2 dup dup +       [102 2 4]
dup * - -         [116]   Add 14 to 'f' (= 't')
dup outC          [116]   Print 't'
5 inC + outC      []      Add 5 and print 'y'
                          (inC is ignored; it is to reuse the crossing purple cell)
\$\endgroup\$
9
\$\begingroup\$

Hexagony, 6 bytes, 17 cycles

s;i>x@

Try it online!

Now the letters six are in more natural order, and the program finishes one cycle faster.

How it works

For more thorough explanation, see the previous answer below.

 A B
C > D
 E .
Execution path: ABC>CBAD>ADB.>.CE
                ^^  ^^    ^^    ^
                s;  i;    x;    @

Hexagony, 6 bytes, 18 cycles

x>i;s@

Try it online!

Inspired by boboquack's 9-byte solution. The following quote was a big hint:

I'm slightly disappointed that I couldn't get six to work (that would be pushing it with three characters, one output, one redirection and one termination).

How it works (or, How I got to this solution)

A 6-byte program is laid out on a hexagon of side length 2, and the 7th instruction is necessarily a no-op:

 ? ?
? ? ?
 ? .

Since I needed at least one mirror, I tried out various mirrors placed at various places, until I found this:

 A >
B C D
 E .

Assuming the current memory is always positive (and there are no branches/mirrors/IP changers among ABCDE), the IP follows the path

A>ADCB>.CAD>DAC.BE

The cell C is run exactly three times, and the cells right before C are D, B, and A respectively. And the cell E is first run after three runs of C. This is exactly what we want: write one of s, i, or x on the memory and print it, and then terminate!

Now back to the actual source code:

 x >
i ; s
 @ .

And the execution path, linearized, with significant instructions emphasized:

x>xs;i>.;xs>sx;.i@
   ^^^  ^    ^^  ^
   ^^              Print 's'
     ^  ^          Print 'i'
             ^^    Print 'x'
                 ^ Terminate
\$\endgroup\$
8
\$\begingroup\$

SOGL V0.12, 3 bytes

Well, SOGL has a string compression library that seems to compress "three" to 3 bytes.

@0‘

Try it Here!

\$\endgroup\$
2
  • \$\begingroup\$ Gratz, unless a language exists which prints zero, nowt, or nought with an empty program this is probably as good as it'll get. \$\endgroup\$ Commented Oct 19, 2019 at 13:56
  • 2
    \$\begingroup\$ ...I stand corrected! \$\endgroup\$ Commented Oct 19, 2019 at 14:04
8
\$\begingroup\$

Brainf***, 90 bytes

+[+[>>+<+<-]>]>[>+>+>+>+>+>+<<<<<<-]>.>-----.>.>---------.>++++++.>+++++++++++.<+><><><><>

Try it online!

\$\endgroup\$
7
\$\begingroup\$

Lost, 30 bytes

v<<<<<<<>>>>>>>
>%?"thirt/J"+@

Contains the unprintable character ESC with unicode value 27 after the ^ on the second line. Thanks to @JoKing getting rid of the unprintable (for the same byte-count).

Try it online or verify that it's deterministic.

Explanation:

Explanation of the language in general:

Lost is a 2D path-walking language. Most 2D path-walking languages start at the top-left position and travel towards the right by default. Lost is unique however, in that both the start position AND starting direction it travels in is completely random. So making the program deterministic, meaning it will have the same output regardless of where it starts or travels, can be quite tricky.

A Lost program of 2 rows and 5 characters per row can have 40 possible program flows. It can start on any one of the 10 characters in the program, and it can start traveling up/north, down/south, left/west, or right/east.

In Lost you therefore want to lead everything to a starting position, so it'll follow the designed path you want it to. In addition, you'll usually have to clean the stack when it starts somewhere in the middle.

Explanation of the program:

All arrows, including the reflect / in the string, will lead the path towards the leading > on the second line. From there the program flow is as follows:

  • >: travel in an east/right direction
  • %: Put the safety 'off'. In a Lost program, an @ will terminate the program, but only when the safety is 'off'. When the program starts, the safety is always 'on' by default, otherwise a program flow starting at the exit character @ would immediately terminate without doing anything. The % will turn this safety 'off', so when we now encounter an @ the program will terminate (if the safety is still 'on', the @ will be a no-op instead).
  • ?: Clean the top value on the stack. In some program flows it's highly likely we have a partial string on the stack, so we use this to wipe the stack clean of that potential string.
  • ": Start a string, which means it will push the integer code-points of the characters used.
  • thirt/J: Push the code-points for these characters, being 116 104 105 114 116 47 74 respectively
  • ": We're done pushing code-points of this string
  • +: Add the top two values together: (47+74=) 121
  • @: Terminate the program if the safety is 'off' (which it is at this point). After which all the values on the stack will be output implicitly. Using the -A program argument flag, these code-points will be output as characters instead.

Two things to note:

The top part could also have been v<<<<<<<<<<<<<< instead. Lost will wrap around to the other side when moving in a direction. So using v<<<<<<<>>>>>>> could be a slightly shorter path, and since it's the same byte-count anyway, why not use it. :)
Also, the first line contains an additional trailing > to make the byte-count from 29 to 30.

\$\endgroup\$
4
  • \$\begingroup\$ This is a nice find! \$\endgroup\$
    – ouflak
    Commented Oct 21, 2019 at 13:07
  • \$\begingroup\$ @ouflak Thanks, although I must admit it's very similar as the Hello World! answer in Lost. It took a while before I realized I could use an unprintable to output thirty, though. Otherwise I would have had to settle with forty with a bunch more no-op trailing >. \$\endgroup\$ Commented Oct 22, 2019 at 7:23
  • \$\begingroup\$ You can do /J to avoid the unprintable if you like \$\endgroup\$
    – Jo King
    Commented Oct 22, 2019 at 23:02
  • \$\begingroup\$ @JoKing Ah, I tried some combinations with both addition and subtraction of the arrow, but forgot about the reflects / and ``. Thanks, that indeed looks better. :) \$\endgroup\$ Commented Oct 23, 2019 at 6:19
6
\$\begingroup\$

Jelly, 4 bytes

“Ɱ9»

Try it online!

\$\endgroup\$
6
\$\begingroup\$

JavaScript, 16 10 bytes

-6 each from Night2's suggestion in the comments

Try it online! (alert doesn't work in TIO, so I'm using print)

alert`ten`

Javascript, 26 20 bytes

Try it online!

console.log`twenty`;
\$\endgroup\$
4
  • \$\begingroup\$ @Night2 The JS print function is used for printers, not console output, I think. \$\endgroup\$
    – rydwolf
    Commented Oct 19, 2019 at 19:10
  • 1
    \$\begingroup\$ @Night2 Ah, makes sense. I'll update the TIO, but keep it as alert on here since it's more recognizable (sort of) \$\endgroup\$
    – rydwolf
    Commented Oct 19, 2019 at 20:11
  • \$\begingroup\$ Where can I find some explanation regarding the syntax used here? I've never seen this before (ommiting the brackets), but it indeed works with any function. What's it called? \$\endgroup\$ Commented Oct 21, 2019 at 13:50
  • 1
    \$\begingroup\$ @TomášZato They're called tagged templates. I found some info on them here, in the Tagged templates section \$\endgroup\$
    – rydwolf
    Commented Oct 21, 2019 at 15:42
6
\$\begingroup\$

Keg, 3 bytes

-1 from Jono2906 for reminding me the string compression

2 can play the 3 byte game!

‘0⅀

TIO

Old answer, 4 bytes

You can't get shorter than 4. (Without using string compression of course.) 4 is the smallest English word that is the same length as the number it represents.

Just some good old-fashioned Ascii/auto-pushing Keg golfing!

four

Try it online!

Explanation

four#   Push 4 onto the stack
#Implicit Print
\$\endgroup\$
1
  • \$\begingroup\$ Ah, didn't see your answer when I posted mine. Good job! \$\endgroup\$
    – lyxal
    Commented Oct 20, 2019 at 0:31
6
\$\begingroup\$

Shakespeare Programming Language, 800 bytes

Try it online!

(Whitespace added for readability)

800 Bytes---- filler.Ajax,.Puck,.Act I:.
Scene I:.[Enter Ajax and Puck]Ajax:
You is the sum ofthe sum ofthe cube ofa big big cat a big big cat a cat.Speak thy.
You is the sum ofyou a big big cat.Speak thy.
You is the sum ofyou a big pig.Speak thy.
You is the sum ofyou a cat.Speak thy.
You is the sum ofyou twice twice the sum ofa big cat a cat.Speak thy.
You big big big big big cat.Speak thy.
You is twice the sum ofyou a big big cat.Remember you.Speak thy.
You is the sum oftwice you the cube ofthe sum ofa big pig a pig.Speak thy.
You is the sum ofyou the sum ofa big big big pig a cat.Speak thy.
Recall.You is the sum ofyou a big big pig.Remember you.Remember you.Speak thy.
You is the sum ofyou twice the sum ofa big big big cat a pig.Speak thy.
Recall.You is the sum ofyou a cat.Speak thy.
Recall.Speak thy.

Prints EIGHT HunDRED. The math to get from one letter to another was very complicated and there was little room for error. This is probably improvable in terms of code, but 700 is most likely impossible. Little improvement saving 2 bytes in the actual code because I missed out on optimizing 2*(4+2) to 2*2*(2+1) for some reason.

\$\endgroup\$
6
\$\begingroup\$

C# (.NET Core), 64 bytes

class P{static void Main(){System.Console.Write("sixty four");}}

I had to see what a non-competitive language would score.

Try it online!

\$\endgroup\$
2
  • 5
    \$\begingroup\$ sixty? \$\endgroup\$
    – Night2
    Commented Oct 20, 2019 at 6:53
  • 1
    \$\begingroup\$ Would be nine if lambdas were allowed. \$\endgroup\$
    – Neil
    Commented Oct 20, 2019 at 9:44
5
\$\begingroup\$

Excel, 4 bytes

four

Uninteresting answer, not using a formula.


Excel, 5 bytes

'five

Using a formula, requires at least 3 extra bytes (=, ", ").

Excel, 6 bytes

="six"

Excel, 12 bytes

="tw"&"elve"
=T("twelve")

Excel, 14 bytes

=T("fourteen")

Excel, 16 bytes

=IF(1,"sixteen")

Excel, 18 bytes and upwards

=TRIM(" % ")

Insert required text, padded with required whitespace.

\$\endgroup\$
5
\$\begingroup\$

Taxi, 164 160 bytes

"One hundred sixty" is waiting at Writer's Depot.
Go to Writer's Depot: w 1 r 3 l 2 l.
Pickup a passenger going to Post Office.
Go to Post Office:n 1 r 2 r 1 l.

Try it online!

This also throws an error because I don't return the taxi to the garage so my boss fires me. It's not a requirement to not throw errors, though, so I guess I'm fired.

\$\endgroup\$
1
  • \$\begingroup\$ Yeah, that's all and well. \$\endgroup\$ Commented Oct 22, 2019 at 14:52
5
\$\begingroup\$

vemf, 6 5 bytes

"five

Outputs five. try it online

\$\endgroup\$
1
  • 1
    \$\begingroup\$ Welcome to Code Golf! Looks like an interesting language. \$\endgroup\$
    – rydwolf
    Commented Mar 27, 2023 at 18:39
4
\$\begingroup\$

Python 3, 16 bytes

print("sixteen")

Try it online!

Also works in Proton.

\$\endgroup\$
1
  • 2
    \$\begingroup\$ I think you just beat me to this. Same code works in both Python 3 and Lua. \$\endgroup\$
    – ouflak
    Commented Oct 19, 2019 at 15:41
4
\$\begingroup\$

ink, 4 bytes

Four

Try it online!

Predictably enough, it prints Four

\$\endgroup\$
0
4
\$\begingroup\$

Batch, 10 bytes

@ echo ten

If you think the extra space after the @ is ugly, the next possible answer is:

@echo twelve
\$\endgroup\$
4
  • \$\begingroup\$ Why not just echo nine? \$\endgroup\$
    – Night2
    Commented Oct 19, 2019 at 15:20
  • \$\begingroup\$ @Night2 Because that echos the command echo nine as well as its output. \$\endgroup\$
    – Neil
    Commented Oct 19, 2019 at 16:36
  • \$\begingroup\$ But running directly from command prompt, doesn't do that (unless it doesn't count as Batch). \$\endgroup\$
    – Night2
    Commented Oct 19, 2019 at 17:38
  • 1
    \$\begingroup\$ @Night2 No, that would be a snippet, or a REPL, or something along those lines. \$\endgroup\$
    – Neil
    Commented Oct 19, 2019 at 18:33
4
\$\begingroup\$

05AB1E (legacy), 3 bytes

“„í

Try it online!

Using dictionary

\$\endgroup\$
2
  • \$\begingroup\$ Works with ' instead of too. Also why legacy? \$\endgroup\$
    – Makonede
    Commented May 10, 2021 at 21:29
  • 1
    \$\begingroup\$ @Makonede yes it seems to work but honestly Idk osabie I wrote this following the docs, I was sure it has a dictionary. One of the most interesting esoteric languages for sure.. Maybe I 'll try to learn in the future! \$\endgroup\$
    – AZTECCO
    Commented May 18, 2021 at 20:00
4
\$\begingroup\$

Bash, 15 9 bytes

echo nine

Try it online!

Thanks to:
- @Night2 for saving me 6 bytes

\$\endgroup\$
2
  • 3
    \$\begingroup\$ 9 bytes. By the way you can click on 🔗 icon in tio.run and copy/paste "Code Golf submission (Stack Exchange)" section here to have auto generated answer with correct formatting. \$\endgroup\$
    – Night2
    Commented Oct 19, 2019 at 17:41
  • \$\begingroup\$ @Night2 Thank your for the improvment and the tip :) \$\endgroup\$
    – Paul-B98
    Commented Oct 19, 2019 at 18:05
1
2 3 4 5

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.