text:
Find a Rocco number
I was asked this question in an interview but I was unable to figure out any solution. I don't know whether the question was right or not. I tried a lot but couldn't reach any solution. Honestly speaking, nothing came to my mind.
Rocco numbers
A positive integer \$n\$ is a Rocco number if it can be represented either as \$n=p(p+14)\$ or \$n=p(p-14)\$, where \$p\$ is a prime number.
The first 10 Rocco numbers are:
$$32, 51, 95, 147, 207, 275, 351, 435, 527, 627$$
Task
Your code must accept a positive integer as input and determine if it is a Rocco number or not.
Brownie points

Write a function that calculates and prints the count of Rocco numbers less than or equal to 1 million.
Write a function that calculates and prints the count of Rocco numbers from the bonus question (above one) that are prime.

Hi and welcome to PPCG. We host challenges (your's looks really interesting) that have objective scoring and winning criteria. Try editing your post to include that. I recommend [tag:code-golf] as the goal, since it is the easiest to get right. Also, you want to avoid those bonuses; just focus on one clear task.

output would be an integer: Don't you mean a Boolean for whether the input was a Rocco number or not?

Bonus 2: print 0. All Rocco numbers are composite (n*..), so no primes in any range.

Yeah the bonuses are trivial as golf. To be fair to the OP they do both state "that calculates" (I know, unobservable...).

confirmed 281 (286 if we were to include negative integers).

@JonathanAllan If it has to be EITHER +14 OR -14 (xor, as in the description), i count 233

All duplicates exist where primes are 14 apart (eg. 51 is 3*(3+14) and 17*(17-14))

@TFeld Yeah, I must have made a typo. 286 with negatives, 281 without. 237 and 233 for xor.

@JonathanAllan Sure it "calculates", using the formula a×10²+b×10+c for some  very specific values of a,b,c ;-)

The "bonus points" can simply be hardcoded values, and aren't beneficial to the challenge at all. I recommend removing them.

I've edited the question and the tags. Feel free to either rollback or edit further if you do not agree. As @EriktheOutgolfer said, I think the bonuses should be removed.

You need to add some test cases.

I consider the question is clear and has a valid winning criteria. I would remove the Brownie points tho. Anyway, voted to re-open

I wish it was open - I have a submission.

05AB1E, 8 bytes
Returns \$1\$ if \$n\$ is a Rocco number, or \$0\$ otherwise.
fDŠ/α14å

Try it online!
How?
Given a positive integer \$n\$, we test whether there exists a prime factor \$p\$ of \$n\$ such that:
$$\left|p-\frac{n}{p}\right|=14$$
Commented
fDŠ/α14å  # expects a positive integer n as input       e.g. 2655
f         # push the list of unique prime factors of n  -->  2655, [ 3, 5, 59 ]
 D        # duplicate it                                -->  2655, [ 3, 5, 59 ], [ 3, 5, 59 ]
  Š       # moves the input n between the two lists     -->  [ 3, 5, 59 ], 2655, [ 3, 5, 59 ]
   /      # divide n by each prime factor               -->  [ 3, 5, 59 ], [ 885, 531, 45 ]
    α     # compute the absolute differences
          # between both remaining lists                -->  [ 882, 526, 14 ]
     14å  # does 14 appear in there?                    -->  1

JavaScript (ES7), 55 bytes
n=>(g=k=>k>0&&n%--k?g(k):k==1)(n=(49+n)**.5-7)|g(n+=14)

Try it online!
How?
Given a positive integer \$n\$, we're looking for a prime \$x\$ such that \$x(x+14)=n\$ or \$x(x-14)=n\$.
Hence the following quadratic equations:
$$x^2+14x-n=0\tag{1}$$
$$x^2-14x-n=0\tag{2}$$
The positive root of \$(1)\$ is:
$$x_0=\sqrt{49+n}-7$$
and the positive root of \$(2)\$ is:
$$x_1=\sqrt{49+n}+7$$
Therefore, the problem is equivalent to testing whether either \$x_0\$ or \$x_1\$ is prime.
To do that, we use the classic recursive primality test function, with an additional test to make sure that it does not loop forever if it's given an irrational number as input.
g = k =>    // k = explicit input; this is the divisor
            // we assume that the implicit input n is equal to k on the initial call
  k > 0 &&  // abort if k is negative, which may happen if n is irrational
  n % --k ? // decrement k; if k is not a divisor of n:
    g(k)    //   do a recursive call
  :         // else:
    k == 1  //   returns true if k is equal to 1 (n is prime)
            //   or false otherwise (n is either irrational or a composite integer)

Main wrapper function:
n => g(n = (49 + n) ** .5 - 7) | g(n += 14)

Perl 6, 45 28 bytes
((*+49)**.5+(7|-7)).is-prime

Try it online!
Uses Arnauld's construction, that \$\sqrt{n+49}\pm7\$ must be prime for \$n\$ to be a Rocco number.
Explanation:
 (*+49)**.5                   # Is the sqrt of input+49
           +(7|-7)            # Plus or minus 7
(                 ).is-prime  # Prime?

Regex (ECMAScript), 64 62 bytes
^(?=(x((x{14})(x+)))(?=(\1*)\4\2*$)(\1*$\5))\6\3?(?!(xx+)\7+$)

Try it online!
Takes its input in unary, as a sequence of x characters whose length represents the number.
This regex finds two numbers \$a\$ and \$a+14\$ such that \$n=a(a+14)\$. If it finds them, it then asserts that either \$a\$ or \$a+14\$ is prime.
The multiplication algorithm implemented here searches for two unknown factors which, when multiplied together, equal a known product. The regex for this is also essentially equivalent to that of the shortest form of multiplication for asserting that two known factors multiply to make a known product.
In many of my other posted regex answers, multiplication is implemented as finding the unknown product of two known factors; the shortest form of that is different. Both methods would work in both circumstances, but golf-wise, they're worse at doing each other's job.
Here is an explanation of how this form of multiplication works in general:
We have \$AB \stackrel{?}{=} C\$, where \$A \ge B\$. The steps to asserting \$AB=C\$ are (shown here in an order that's easier to explain conceptually; in the regex they're done in the order that results in the best golf):

Assert that \$C-A \equiv 0 \pmod A\$

This is equivalent to \$C \equiv 0 \pmod A\$, a direct consequence of \$C=AB\$

Assert that \$C-A-(B-1) \equiv 0 \pmod {A-1}\$,

This can be shown to result from \$C=AB\$:
\$\begin{aligned}C-A-(B-1) &= AB-A-(B-1) \\ &= A(B-1)-(B-1) \\ &= (A-1)(B-1)\end{aligned}\$

Assert that there is no \$0<D<C\$ which satisfies both of the above with \$D\$ in place of \$C\$

This can be expressed as:

Assert that the only \$0<E \le C-A\$ that satisfies the following moduli is \$E=C-A\$:

\$E \equiv 0 \pmod A\$
\$E \equiv B-1 \pmod {A-1}\$

We now have two coprime moduli, \$A\$ and \$A-1\$. By the Chinese remainder theorem, there is one and only one integer \$E\$ such that \$0 < E \le A(A-1)\$, or alternatively stated, \$0 < E+A \le A^2\$, and the above moduli are satisfied. And since we know \$B\le A\$, it follows that \$AB\le A^2\$.
The algebra above shows there is at least one \$E\$ satisfying the moduli: \$E=AB-A\$. The Chinese remainder theorem shows that there is exactly one \$E\$ satisfying the moduli within a certain range. The fact that \$B\le A\$ guarantees that \$AB-A\$ falls inside that range. We are not guaranteed that \$C\le A^2\$, but as long as we search for the smallest \$E\$ satisfying the moduli, we're guaranteed that \$E=AB-A\$, so if \$E=C-A\$, then \$AB=C\$.
The regex essentially searches for the smallest \$E\$ satisfying the moduli, then asserts that \$E=C-A\$. The assertion of \$C \equiv 0 \pmod A\$ is done afterward, making the regex a bit slower in the name of golf.
Also note that in regex, \$0 \equiv 0 \pmod 0\$, so the algorithm works for \$A=1\$ without any need for a special case.
In cases where we don't know whether \$A\ge B\$, and can't capture them at the source in such a way as to automatically sort them as such, we can simply assert both versions of each:

\$C \equiv 0 \pmod A\$
\$C \equiv 0 \pmod B\$
\$C-B \equiv 0 \pmod {A-1}\$
\$C-A \equiv 0 \pmod {B-1}\$

This makes for shorter golf than actually sorting \$A\$ and \$B\$ into lesser and greater after they've already been captured. But for this particular problem, only the two assertions need to be used, since by definition \$A=B+14\$.
And the regex, pretty-printed and commented:
# For the purposes of these comments, the input number = N.
^
# Find two numbers A and A+14 such that A*(A+14)==N.
(?=
    (x((x{14})(x+)))   # \1 = A+14; \2 = \1-1; \3 = 14; \4 = A-1; tail -= \1
    (?=                # Assert that \1 * (\4+1) == N.
        (\1*)\4\2*$    # We are asserting that N is the smallest number satisfying
                       # two moduli, thus proving it is the product of A and A+14
                       # via the Chinese Remainder Theorem. The (\1*) has the effect
                       # of testing every value that satisfies the "≡0 mod \1"
                       # modulus, starting with the smallest (zero), against "\4\2*$",
                       # to see if it also satisfies the "≡\4 mod \2" modulus; if any
                       # smaller number satisfied both moduli, (\1*) would capture a
                       # nonzero value in \5. Note that this actually finds the
                       # product of \4*\1, not (\4+1)*\1 which what we actually want,
                       # but this is fine, because we already subtracted \1 and thus
                       # \4*\1 is the value of tail at the start of this lookahead.
                       # This implementation of multiplication is very efficient
                       # golf-wise, but slow, because if the number being tested is
                       # not even divisible by \1, the entire test done inside this
                       # lookahead is invalid, and the "\1*$" test below will only
                       # fail after this useless test has finished.
    )
    (\1*$\5)           # Assert that the above test proved \1*(\4+1)==N, by
                       # asserting that tail is divisible by \1 and that \5==0;
                       # \6 = tool to make tail = \1
)
# Assert that either A or A+14 is prime.
\6                     # tail = \1 == A+14
\3?                    # optionally make tail = A
(?!(xx+)\7+$)          # Assert tail is prime. We don't need to exclude treating
                       # 1 as prime, because the potential false positive of N==15
                       # is already excluded by requiring \4 >= 1.

Brachylog, 13 12 bytes
ṗ;14{+|-};?×

Enter the candidate number as a command-line argument. Outputs true or false. Try it online!
Explanation
The code is a predicate whose input is unconstrained and whose output is the number we're testing.
ṗ             Let the input ? be a prime number
 ;14          Pair it with 14, yielding the list [?, 14]
    {+|-}     Either add or subtract, yielding ?+14 or ?-14
         ;?   Pair the result with the input, yielding [?+14, ?] or [?-14, ?]
           ×  Multiply; the result must match the candidate number

(Tips are welcome. That {+|-} still feels clunky.)

Brachylog, 9 bytes
Different approach then DLosc's answer
Ċ-14&∋ṗ&×

Takes N as output, gives [P, P-14] or [P+14,P] back through input (biggest number first)
explanation
Ċ              # The 'input' is a pair of numbers
 -14           #   where the 2nd is 14 smaller then the first
    &∋ṗ        #   and the pair contains a prime
       &×      #   and the numbers multiplied give the output (N)

Try it online!

Pyth, 22 20 bytes
}Qsm*Ld+Ld_B14fP_TSh

Try it online here.
}Qsm*Ld+Ld_B14fP_TShQ   Implicit: Q=eval(input())
                        Trailing Q inferred
                  ShQ   Range [1-(Q+1)]
              fP_T      Filter the above to keep primes
   m                    Map the elements of the above, as d, using:
          _B14            [14, -14]
       +Ld                Add d to each
    *Ld                   Multiply each by d
  s                     Flatten result of map
}Q                      Is Q in the above? Implicit print

Edit: Saved 3 bytes as input will always be positive, so no need to filter out negative values from the list. Also fixed a bug for inputs 1 and 2, costing 1 byte. Previous version: }Qsm*Ld>#0+Ld_B14fP_TU

05AB1E, 16 15 14 bytes
Saved 1 byte by computing 14 with 7· instead of žvÍ (cant believe I didnt think of this in the first place).
Saved 1 byte thanks to Emigna
ÅPε7·D(‚+y*Q}Z

Try it online! or Test all inputs
Explanation
                 # Implicit input n
ÅP               # Push a list of primes up to n
  ε         }    # For each prime in the list...
   7·            # Push 14 (by doubling 7)
     D(‚         # Push -14 and pair them together to get [14,-14]
        +        # Add [14,-14] to the prime
         y*      # Multiply the prime to compute p(p-14) and p(p+14)
           Q     # Check if the (implicit) input is equal to each element
             Z   # Take the maximum

You can save a byte by changing }˜så to Q}Z utilizing implicit input. Your Test-Suite would have to be changed up a bit to something like this to get it to work then. Also, a more obvious way of writing žvÍ or 7· would be 14 ;)

Thanks! Why make it easy when you can push 14 in the most complicated way /facepalm :)

J, 21 15 bytes
Based on Arnauld's solution:
14 e.q:|@-(%q:)

Try it online!
Previous atempt:
e.&,14&(]*+,-~)@p:@i.

Try it online!

14 e.q:|@-]%q: for 14 bytes

Retina 0.8.2, 61 bytes
.+
$*
^((1{14})1(1)+)(?<=(?<!^\4+(..+))\2?)(?<-3>\1)+$(?(3)1)

Try it online! Explanation:
.+
$*

Convert to unary.
^((1{14})1(1)+)

\1 captures the larger of the two factors. \2 captures the constant 14, saving a byte. \3 captures the smaller of the two factors, minus 1. This also ensures that both factors are at least 2.
(?<=(?<!^\4+(..+))\2?)

Check the two factors to ensure at least one of them is prime. The idea of using \2? was shamelessly stolen from @Deadcode's answer.
(?<-3>\1)+

Repeat the larger of the two factors a number of times equal to one less than the smaller of the two factors. As we've already captured the larger factor once this then ends up capturing the product of the two factors.
$(?(3)1)

Ensure that the product equals the given number.
A direct translation to Retina 1 by replacing $* with *1 would have the same byte count but a byte could be saved by replacing all the 1s with _s and then the *1 could be replaced with * rather than *_. Previous Retina 1 answer for 68 bytes:
.+
*
Lw$`^(__+)(?=(\1)+$)
$1 _$#2*
Am` (__+)\1+$
(_+) \1

0m`^_{14}$

Try it online! Explanation:
.+
*

Convert to unary.
Lw$`^(__+)(?=(\1)+$)
$1 _$#2*

Find all the pairs of factors.
Am` (__+)\1+$

Ensure one is prime.
(_+) \1

Take the absolute difference.
0m`^_{14}$

Check whether any are 14.

JavaScript (Babel Node), 69 bytes
Damn, I though I was going to beat Arnaulds' Answer but no..... :c
x=>[...Array(x)].some((a,b)=>x/(a=(p=n=>--b-1?n%b&&p(n):n)(b))-a==14)

Try it online!
I want to get rid of the x=>[...Array(x)].some( part using recursion so it might get shorter over time
Explanation
x=>[...Array(x)]                                                              Creates a range from 0 to x-1 and map:

                .some((a,b)=>                                                 Returns True if any of the following values is true
                             x/                                              Input number divided by
                                (a=(p=n=>--b-1?n%b&&p(n):n)(b))               recursive helper function. Receives a number (mapped value) as parameters and returns
                                                                              the same number if it is prime, otherwise returns 1. Take this value
                                                                              and assign to variable a
                                                               -a            Subtract a from the result
                                                                     ==14    Compare result equal to 14

It uses the formula
$$ n/p-p==14 $$

APL(NARS) 16 chars, 32 bytes
{14=∣r-⍵÷r←↑⌽π⍵}

{π⍵} would find the factorization of its argument and we suppose that the last element of its result (the list of divisors of n) is the maximum prime divisor of n;
Here we suppose that one equivalent definition of Rocco number is: n is a Rocco number <=> max factor prime of n: r is such that it is true
14=∣r-n÷r [for C pseudocode as 14==abs(r-n/r) this definition of Rocco number seems ok at last in the range 1..1000000]; the range of ok value would be 1..maxInt; test:
 f←{14=∣r-⍵÷r←↑⌽π⍵}
 {⍞←{1=f ⍵:' ',⍵⋄⍬}⍵⋄⍬}¨1..10000
32  51  95  147  207  275  351  435  527  627  851  1107  1247  1395  1551  1887  2067  2255  2451  2655  2867  3551  4047  4307  4575  5135  5427  5727  6035  6351  6675  7347  8051  8787  9167  9951

Japt, 10 bytes
Same as my Javascript Answer
k d@/X-X¥E

Try it online!

Jelly, 9 bytes
:ạ⁹ɗÆf14e

Try it online!

C# (Visual C# Interactive Compiler), 99 bytes
n=>Enumerable.Range(2,n).Any(p=>Enumerable.Range(2,p).All(y=>y>=p|p%y>0)&(n==p*(p+14)|n==p*(p-14)))

Try it online!
Enumerable.Range strikes again :) Using the crazy compiler flag, you can reduce things quite a bit, although I am kind of a fan of the vanilla solution.
C# (Visual C# Interactive Compiler) + /u:System.Linq.Enumerable, 77 bytes
n=>Range(2,n).Any(p=>Range(2,p).All(y=>y>=p|p%y>0)&(n==p*(p+14)|n==p*(p-14)))

Try it online!
Below is a port of Arnauld's solution that seemed pretty cool. It is currently the longest, but it can probably be golfed some.
C# (Visual C# Interactive Compiler), 101 bytes
n=>{bool g(int k)=>--k<2?n>1:n%k>0&g(k);var d=Math.Sqrt(n+49)-7;return(n=(int)d)==d&(g(n)|g(n+=14));}

Try it online!

Husk, 10 bytes
€14mS≠`/¹p

Try it online! Given an integer, the function outputs a truthy or falsy value. A port of Arnauld's answer.

APL(NARS) 30 chars, 60 bytes
{∨/{0=1∣⍵:0π⍵⋄0}¨(7,¯7)+√49+⍵}

Here 0π is the function say if one number is a prime, test:
 f←{∨/{0=1∣⍵:0π⍵⋄0}¨(7,¯7)+√49+⍵}
 {⍞←{1=f ⍵:' ',⍵⋄⍬}⍵⋄⍬}¨0..700
32  51  95  147  207  275  351  435  527  627

F#, 2 answers (noncompeting)
I really liked @Arnauld 's answers, so I translated them.
123 bytes, based on the JavaScript answer
fun n->let t=int<|sqrt(float n+49.)in Seq.map(fun n->Seq.filter(fun i->n%i=0)[1..n]|>Seq.length=2)[t-7;t+7]|>Seq.reduce(||)

Explanation:
fun n->let t=int<|sqrt(float n+49.)in Seq.map(fun n->Seq.filter(fun i->n%i=0)[1..n]|>Seq.length=2)[t-7;t+7]|>Seq.reduce(||) //Lambda which takes an integer, n
       let t=int<|sqrt(float n+49.)                                                                                //let t be n, converted to float, add 49 and get square root, converted back to int (F# type restrictions)
                                   in                                                                                //in the following...
                                                                                [t-7;t+7]                 //Subtract and add 7 to t in a list of 2 results (Lists and Seqs can be interchanged various places)
                                      Seq.map(fun n->Seq.filter(fun i->n%i=0)[1..n]|>Seq.length=2)                          //See if either are prime (here, if either result has 2 and only 2 divisors)
                                                                                |>Seq.reduce(||) //And logically OR the resulting sequence

125 bytes, based on the 05AB1E answer
fun n->let l=Seq.filter(fun i->n%i=0)[2..n-1]in let m=Seq.map(fun i->n/i)l in Seq.map2(fun a b->abs(a-b))l m|>Seq.contains 14

Explanation:
fun n->let l=Seq.filter(fun i->n%i=0)[2..n-1]in let m=Seq.map(fun i->n/i)l in Seq.map2(fun a b->abs(a-b))l m|>Seq.contains 14  //Lambda which takes an integer, n
       let l=Seq.filter(fun i->n%i=0)[2..n-1]                                                                                //let l be the list of n's primes
                                             in                                                                                //in...
                                                let m=Seq.map(fun i->n/i)l                                                     //m, which is n divided by each of l's contents
                                                                           in                                                  //and then...
                                                                              Seq.map2(fun a b->abs(a-b))l m                   //take the absolute difference between each pair of items in the two sequences to make a new sequence
                                                                                |>Seq.contains 14  //and does the resulting sequence contain the number 14?

Python 2, 58 bytes
Outputs by exit code, fails (1) for Rocco numbers.
P=k=1.
n=input()
exec"P*=k*k;k+=1;P%k*abs(n/k-k)==14>y;"*n

Try it online!


text:
A Radiation Hardened Palindromic Quine
There are radiation hardened quines, palindromic quines, but has anyone tried both?!
I think not!
Rules
So the challenge here is to make a quine that if any symbol is deleted it prints its original source code, and the quine needs to be the same read forward and backwards(before radiation damage)! All code will be scored based on bytes required to write it.
Things to avoid

Do not use any programs that are capable of directly examining their code and outputting it (that even means programs that take their source and dump it into some sort of data)
Do not use anything that somehow cheats all of this (like a function that outputs itself and some other character... please)

DO YOUR BEST!!!

Welcome to the site! I would recommend changing "things to avoid" to "these are not allowed". Generally, "requirements" work better on this site than "recommendations", since you can usually save bytes by ignoring recommendations. Also, point 3 doesn't make a whole lot of sense. If every program must be palindromic and hardy, then you're only scoring based off length.

Gotcha, I'll make sure to use recommendations from now on, also I see now that i was being repetitive! Hopefully now it looks better and makes sense

@KrystosTheOverlord Maybe you misunderstood something, requirements are better than recommendations here.

Oh, now i see, I feel like an idiot. Thanks for pointing that out, I'm still a little new to all of this.

Gol><>, 78 bytes
\<"2ss}}l2%?:}a`(:&K&:&]r&[r~H>.!01<<\

\<<10!.>H~r[&r]&:&K&:(`a}:?%2l}}ss2"<\

Try it online!
Verification!
A variation on the radiation hardened quine I posted yesterday. It's a little more complex since it needs to reverse the copied section using the undocumented [] operators, as well as redirect the pointer in one copy. If you're a little confused about why it doesn't look like a palindrome, remember that ><> is a palindrome itself.

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

sort: votes


text:
There's a hole in the bottom of the sea
Whilst trying (and failing) have persuade my infant son to eat his dinner, I tried singing to him. Mid way through this song I realised the formulaic structure might lend itself well to code golfing!
The task is to write a program or function which accepts no input and produces the following text:
There's a hole in the bottom of the sea
There's a hole in the bottom of the sea
There's a hole, there's a hole
There's a hole in the bottom of the sea

There's a log in the hole in the bottom of the sea
There's a log in the hole in the bottom of the sea
There's a hole, there's a hole
There's a hole in the bottom of the sea

There's a bump on the log in the hole in the bottom of the sea
There's a bump on the log in the hole in the bottom of the sea
There's a hole, there's a hole
There's a hole in the bottom of the sea

There's a frog on the bump on the log in the hole in the bottom of the sea
There's a frog on the bump on the log in the hole in the bottom of the sea
There's a hole, there's a hole
There's a hole in the bottom of the sea

There's a wart on the frog on the bump on the log in the hole in the bottom of the sea
There's a wart on the frog on the bump on the log in the hole in the bottom of the sea
There's a hole, there's a hole
There's a hole in the bottom of the sea

There's a hair on the wart on the frog on the bump on the log in the hole in the bottom of the sea
There's a hair on the wart on the frog on the bump on the log in the hole in the bottom of the sea
There's a hole, there's a hole
There's a hole in the bottom of the sea

There's a fly on the hair on the wart on the frog on the bump on the log in the hole in the bottom of the sea
There's a fly on the hair on the wart on the frog on the bump on the log in the hole in the bottom of the sea
There's a hole, there's a hole
There's a hole in the bottom of the sea

There's a flea on the fly on the hair on the wart on the frog on the bump on the log in the hole in the bottom of the sea
There's a flea on the fly on the hair on the wart on the frog on the bump on the log in the hole in the bottom of the sea
There's a hole, there's a hole
There's a hole in the bottom of the sea

There's a smile on the flea on the fly on the hair on the wart on the frog on the bump on the log in the hole in the bottom of the sea
There's a smile on the flea on the fly on the hair on the wart on the frog on the bump on the log in the hole in the bottom of the sea
There's a hole, there's a hole
There's a hole in the bottom of the sea

Challenge rules:

The text may be printed or returned as function output
Each verse is separated by a single empty line
Trailing whitespace is OK as long as it does not change the layout (so no leading whitespace or extra spaces between words)
Trailing newlines are OK too.
No leading newlines.
All languages welcomed, and this is code-golf, so the shortest answer in bytes for each language wins!

Similar to There Was an Old Lady (other similar challenges e.g. this have been closed as duplicates, although I don't think they necessarily should.)

Ho, ro, the rattlin' bog, the bog down in the valley-o.

For comparison (though not a programming language) gzip -5 compresses it to 186 bytes (and bzip2 and xz seem to do worse).

@DanielSchepler Bubblegum :P

Congrats, from another developer parent :)

I want to adapt this song to 05AB1E... "There's a hole in oh-five-ay-bee-one-ee!"

As KC string compression challenges go, I've had more fun with this one than most others in a while so +1 from me.

@Shaggy Thanks for the lovely comment, I'm glad to have given you something fun to think about :o)

Next time use Maxwell's poem: 2(u) (Under the Sea, Under the Sea)

SOGL, 103 94 93 bytes
Ψ ~Δ№Q‘η¦»vζh‛←&M⁶╥7[P≈╔6≡⁸(φΔ\⅔Σ‚>≡ā⁷⁽○¹‘Ξ⁵K4s³‘⁽Bθ2n{@∑" the ”+Κ:bΚē‽:C}TPb"n@²‘+Tō, upcPøP

Try it here!
...‘                 push "bottom of the sea" - kept for the loop, here for
    ...‘             push "hole in log in bump on frog on wart on hair on fly on flea on smile on"
        ...‘         push "there's a "
            ⁽        uppercase the 1st letter of that
             B       save "There's a " in B
              θ      split the long data string on spaces
               2n    split in arrays of length 2

{                     for each of those:
 @∑                   join the current array with spaces - e.g. "hole in"
   " the ”+           append " the " to it
           Κ          prepend that to "bottom of the sea" (or whatever it is now)
            :         create a copy
             bΚ       prepend B to it - finishes current line
               ē‽:C}  if (E++), save a copy of that in C (for the last line)

TP                   print the current line twice
  b"...‘+            B + "hole" - "There's a hole"
         T           output that, keeping item
          ō,         output ", "
             up      print the kept item lowercased
               cP    print the contents of C
                 øP  print an empty line

But....but how?

Incredible. How even--

HNQ strikes again! :\

Would you mind adding an explanation? Curious to see how it works.

@KevinCruijssen added

Stax, 90 87 75 bytes
¥▌▼h4█☻■Ω1gçΔ¶Zjµ│☺X▄)/╞▄╒)¥jêLqα╧ñu┌⌂½╧ûⁿ↕O◘╔╪kl<æàbπïfuσ♪╫qΓ╪ûQ├╘Te♥Æó♣ƒE

Run and debug it
Unpacked, ungolfed, and commented it looks like this.
`;$w]i"50h1&V~OP>F$`            compressed literal for "There's a hole in the bottom of the sea"
X                               store in register X without popping
zG                              push an empty string and jump to the target (trailing })
`hfUiVx}.|j~vG12])Bxk?v zF`j    split "log bump frog wart hair fly flea smile" into array of words
F                               for each word, execute the following
  i. o. i?                      (i ? " o" : " i") where i is the 0-based iteration index
  +                             concatenate to the word
  `_o9!`+                       concatenate "n the "
  G                             jump to target below, resume next foreach iteration when finished
}                               this is the target of `G`, execution resumes when finished
  As|@                          insert substring at position 10
  QQ                            peek and print with newlines twice
  x14(                          trim string to leftmost 14 characters
  q                             peek and print without newlines
  ., p                          print ", " without newline
  vP                            lowercase 14 characters and print with newline
  xP                            push value of register X, then print with newline
  zP                            print blank line

Run this one

Would you mind adding an explanation? Curious to see how it works.

I will but I still have the feeling that a totally different approach will do better.  After I succeed or fail in that I'll explain whatever's left.

@KevinCruijssen:  I had a feeling that that there was a much better approach.  Sure enough, I totally re-wrote it, and saved another 12 bytes of bloat.  I added some explanation as well.

Perl 5, 158 154 bytes
$_="There's a bottom of the sea
";for$,(<{{hole,log}" i",{bump,frog,wart,hair,fly,flea,smile}" o"}>){s/a/a $,n the/;say$_.$_.($t||=s/.{14}/$&, \l$&
$&/r)}

154 bytes
158 bytes

There's a bottom of the sea. The facts check out, +1

:), there's also this variation starting with There's a sea but it's longer

Python 2, 202 190 187 185 183 182 181 bytes
s="bottom of the sea\n"
a="There's a "
for w in'hole log bump frog wart hair fly flea smile'.split():s=w+" %sn the "%'io'['g'in s]+s;print(a+s)*2+a+"hole, t%shole\n"%a[1:]+a+s[-30:]

Try it online!
Old alternatives to 'io'['g'in s] (13 bytes):

14: 'oi'[s[5]<'n']
15: 'io'[len(s)>30], 'ioo'[len(s)%3], 'ooi'[len(s)%4], and 'io'[w[1]=='o']

Saved:

-1 byte, thanks to Jonathan Allan
-1 byte, thanks to Rod
-1 byte, thanks to Erik the Outgolfer

"hole, t%shole\n"%a[1:] saves a byte

You can save a byte by dropping the zip

'oi'[s[5]<'n'] will be an old alternative too: Featuring 'io'['g'in s]!

C (gcc), 261 246 236 bytes
#define X" on the "
char*a="smile"X"flea"X"fly"X"hair"X"wart"X"frog"X"bump"X"log in the hole in the bottom of the sea\n";f(i){for(i=0;i<9;)printf("T%s%sT%1$s%2$sT%1$shole, t%1$shole\nT%1$s%3$s\n","here's a ",a+"_TH<0$\31\r"[i++],a+95);}

-15 bytes, Thanks to Daniel Schepler
-10 bytes, Thanks to ceilingcat
Try it online!

Could you write ,*b="_TH<0$\31\r" instead?

Would it save any bytes to define " in the "?

@OldBunny2800 no, it would be longer! in this case you need at least 6 occurrences to be effective...

05AB1E, 103 100 99 97 96 93 92 bytes
Saved a byte thanks to Kevin Cruijssen
“¥ÊˆŽ bumpÑå‡îtíÁ¤†îÌea¹²“#v’T€Î's a ’s„oiN2‹èy“ÿ ÿn€€ ÿ“©“—è€‚€€í™“JDN_iDU}X14£Dl‚„, ýXõ»,®

Try it online!
Explanation
“¥ÊˆŽ bumpÑå‡îtíÁ¤†îÌea¹²“#v starts a loop over the list ["hole", "log", "bump", "frog", "wart", "hair", "fly", "flea", "smile"]. The words are compressed using the 05AB1E dictionary.
On each we do:
’T€Î's a ’    # push the string "There's a "
s             # move the string from the previous iteration to the top of the stack
              # will be an empty string the first iteration since there is no input
„oiN2‹è       # push "i" for the first 2 iterations and "o" otherwise
y             # push the current word
“ÿ ÿn€€ ÿ“    # use interpolacing to create the meat of the current iteration string
              # meaning "hole in the ", "log in the hole in the " and so on
©             # store a copy in the register for the next iteration
“—è€‚€€í™“    # push the string "bottom of the sea"
JD            # join the whole line together and duplicate it
N_iDU}        # if this is the first iteration, store a copy of the line in X
X14£          # push the first 14 chars of X, which is "There's a hole"
Dl            # make a lower-case copy
‚„, ý         # join the original with the lowercase copy on ", ", forming line 3
X             # push X which is line 4
õ             # push and empty string, to create the line break between sections
»,            # join the whole section on newlines and print
®             # push the register for the next iteration

You can remove the leading õ, because apparently it outputs an empty string by default when a swap is used with nothing on the stack. I couldn't find anything else to golf; very nice answer!

@KevinCruijssen: Oh yeah, I didn't consider that as there's usually input. Thanks :)

PowerShell, 194 188 185 180 174 bytes
$z=$a="in the bottom of the sea"
$b="here's a"
$h="$b hole"
echo hole log bump frog wart hair fly flea smile|%{,"T$b $_ $a"*2
$a='oi'[!$j++]+"n the $_ $a"
"T$h, t$h
T$h $z
"}

Try it online!
Can't quite seem to catch Python...
Basically, sets a few common strings to $h, $a, $z, and $b, then goes through a loop through each of the items (hole, log, ... flea, smile), each iteration outputting the appropriate verse. There's a little bit of logic with !$j++ in the middle to account for the in/on switch that happens. Otherwise, all the strings are just left on the pipeline, and the default Write-Output gives us newlines for free.
-6 bytes thanks to Arnauld.
-3 bytes thanks to mazzy.
-5 bytes thanks to Veskah.
-6 bytes thanks to mazzy.

-3 bytes :) Try it online!

@mazzy That's a clever trick. I'll need to keep that in mind, because I use -split quite a bit for getting words.

Two forgotten bytes

180 bytes

@Veskah Awesome. And now beating Python by a byte, too. :D

Try it online!

Try it online!

@mazzy Nice bit of variable shuffling. Thanks!

JavaScript (ES6),  201 194 189 188  187 bytes
Saved 1 byte thanks to @Shaggy
_=>`14log4bump5frog5wart5hair5fly5flea5smile5`.replace(/.+?\d/g,w=>`T0${(p=w+3+p)+p}1, t01
T01432
`.replace(/\d/g,n=>`here's a |hole|bottom of the sea
|n the | i| o`.split`|`[n]),p=`2T0`)

Try it online!

JavaScript (ES6), 235 bytes
Simply RegPack'ed.
_=>[..."Z[]^_$cdjkqvxz{}~"].reduce((p,c)=>(l=p.split(c)).join(l.pop()),`Tj{{}qq}$$}~~}dd}__}xx}cc}[[v~ frogz$}v
Z{kZz on^x flyz_v], tj]Zkq log in^{k] in^ bottom of^ seajhere's ad wartz~c fleazx$ bumpzq_ hairzd^ the] hole[ smilezcZ
Tj`)

Try it online!

Bash, 168 160 bytes
r="There's a bottom of the sea
";for i in {hole,log}\ in {bump,frog,wart,hair,fly,flea,smile}\ on;{
r=${r/a/a $i the};t=${r:0:14};echo "$r$r${u=$t, ${t,}
$r}";}

160 bytes
168 bytes
Translated from my other answer in Perl.

Japt -Rx, 126 116 113 112 111 109 107 bytes
It turns out that golfing a string compression challenge while on your phone down the boozer is incredibly difficult - who'd've thunk?!
`T's»dâ ÈÞomºfdÈ a`rdS
tE8
¯E
`logn¿mpnfgnØnirnf§nf¤Úè`qÍË2ÆiAV¯E©8 iF¯E ÔqVri'oÃpW+v iSi,)UPÃc

Test it
                                              :The first 3 lines get assigned to variables U, V & W, respectively
`...`                                         :The compressed string "There'sdadholedindthedbottomdofdthedsea"
     rdS                                      :Replace all "d"s with spaces
tE8                                           :Substring of U from 0-based index 14 (E), of length 8 (="  in the ")
¯E                                            :Slice U to index 14 (="There's a hole")
`...`                                         :The compressed string "lognbumpnfrognwartnhairnflynfleasmilent"
     qÍ                                       :Split on "n" (note that the last element is irrelevant)
       Ë                                      :Map each element at 0-based index E in array F
        2Æ                                    :  Map the range [0,2)
          iA                                  :    Insert the following in U at index 10
            V¯                                :      V sliced to index
              E©8                             :        Logical AND of E and 8 (=0 on first iteration, 8 on all others)
                  i                           :      Prepend
                   F¯E                        :        Slice F to index E
                       Ô                      :        Reverse
                        q                     :        Join with
                         Vri'o                :          Replace "i" with "o" in V
                              Ã               :  End map
                               p              :  Push
                                W+            :    W appended with
                                  v           :      W lowercased
                                    iSi,      :      Prepended with a space prepended with a comma
                                        )     :    End append
                                         UP   :    U and an empty string
                                           Ã  :End map
                                            c :Flatten
                                              :Implicitly join with newlines, trim & output

XML, 719 673 603 514 493 486 bytes
<!DOCTYPE a[<!ENTITY T "There's a"><!ENTITY O " on the"><!ENTITY a " hole in the bottom of the sea
"><!ENTITY b " log in the&a;"><!ENTITY c " bump&O;&b;"><!ENTITY d " frog&O;&c;"><!ENTITY e " wart&O;&d;"><!ENTITY f " hair&O;&e;"><!ENTITY g " fly&O;&f;"><!ENTITY i " flea&O;&g;"><!ENTITY z "&T; hole, there's a hole
&T;&a;
">]><a>&T;&a;&T;&a;&z;&T;&b;&T;&b;&z;&T;&c;&T;&c;&z;&T;&d;&T;&d;&z;&T;&e;&T;&e;&z;&T;&f;&T;&f;&z;&T;&g;&T;&g;&z;&T;&i;&T;&i;&z;&T; smile&O;&i;&T; smile&O;&i;&z;</a>

You can "execute" it with xmlstarlet sel -t -m '//a' -v . -n <xml_file_here>.
This would be a lot easier if XML wasn't so verbose, but on the bright side, this is less than 25% the size of the original text.

Retina 0.8.2, 150 bytes

THsmile oNflea oNfly oNhair oNwart oNfrog oNbump oNlog iNE
N
$&$'¶TH
O^$`

.+
$&¶$&¶THW, tHW¶THE¶
H
here's a
E
W iNbottom of the sea
W
hole
N
n the

Try it online! Explanation:

THsmile oNflea oNfly oNhair oNwart oNfrog oNbump oNlog iNE

Insert the last verse.
N
$&$'¶TH

Compute all the verses.
O^$`

Put the verses in the correct order.
.+
$&¶$&¶THW, tHW¶THE¶

Complete each verse and add the chorus.
H
here's a
E
W iNbottom of the sea
W
hole
N
n the

Expand some placeholders.

R, 237 231 bytes
i=" in the "
for(j in 0:8)cat(f<-c(t<-"There's a ",paste(c("log","bump","frog","wart","hair","fly","flea","smile")[j:0],collapse=" on the "),if(j)i,h<-"hole",i,b<-"bottom of the sea
"),f,t,h,", there's a ",h,"
",t,h,i,b,"
",sep="")

Try it online!

PHP, 180 178 bytes
foreach([hole,log,bump,frog,wart,hair,fly,flea,smile]as$w)echo$a=T.($b="here's a ").($s="$w ".io[++$i>2]."n the $s").$c="bottom of the sea
",$a,T,$b.=hole,", t$b
T$b in the $c
";

Run with -nr or try it online.
Yields warnings in PHP 7.2; to fix, put quotes around
the array elements, io, hole and the two standalone T.

C (gcc), 334 328 307 299 bytes
char*s="here's a \0smile on the flea on the fly on the hair on the wart on the frog on the bump on the log in the hole in the bottom of the sea\n";i;k=105;a[]={0,1,1,1,1,0,1,2,2};main(j){for(;i<9;k-=11+a[i++])do{printf("T%s%s",s,s+k);}while(j++&1||!printf("T%shole, t%shole\nT%s%s\n",s,s,s,s+105));}

Try it online!

265 bytes

Japt -R, 142 bytes
`—¤clogc¿mpcfžgcØÖŽrcf§cf¤acsÚè`qc
`ˆ e Þom  e  a`
`T”œ's a `
£W+U¯YÄ ÔËE?"io"gE<Y +`n e `:P +DÃ¸+` {V}
` ²+W+`—¤, t”œ's a —¤
{W}—¤ {V+R

Try it online!

Perl 6, 166 bytes
($/=@(($!="There's a")X [\R,](<hole log bump frog wart hair fly flea smile>Z(<i o>[$++>1]~"n the")xx*)X"bottom of the sea
")).map:{say "$_$_$! hole, {$!.lc} hole
$0"}

Try it online!

Ruby, 173 170 bytes
a="T#{["here's a hole"]*3*"%s"%[", t","
T"]+c=" in the "}bottom of the sea

"
b=a[31,39]
%w{log bump frog wart hair fly flea smile x}.map{|i|puts b,b,a;b[9]+=i+c;c[1]=?o}

Try it online!

Haskell, 243 215 bytes
Reduced to 215 bytes with great help from nimi
c[[l n,l n,'T'#h++", "++'t'#h,l 8,""]|n<-[8,7..0]]
t#u=t:"here's a "++u
h="hole"
c=concat
l n='T'#c(drop n$map(++" on the ")(words"smile flea fly hair wart frog bump")++["log in the ",h," in the bottom of the sea"])

Try it online!
(Old 243 byte version is here).
A quite straightforward solution.
-- main function producing a list of lines
v = concat [[
    l n,
    l n, -- second line of each verse equals to its first line
    'T' # h ++ ", " ++ 't' # h,
    l 8, -- last line of each verse is the same in all verses
    ""
  ] | n <- [8,7..0]]

-- a small helper to construct similar strings
t # u = t : "here's a " ++ u

h = "hole"

-- construct a first line of n-th verse (with n = 8 is the first and n = 0 is the last one)
-- Every such line begins with a constant prefix followed by expanding list of nested entities
l n = 'T' # concat (
      drop n $
         map (++ " on the ") (words "smile flea fly hair wart frog bump")
         ++ ["log in the ", h, " in the bottom of the sea"]
    )

Some tips: a) you use s only once, so you can inline it. b) you always prepend and append something to t, so you can make it a (infix) function: t#u=t:"here's a "++u. c) constructing the big list in function l with map(++" on the ")(words"smile flea ..." is shorter. Also: move everything appended to that list into the list itself. d) the list of numbers to drop now runs from 8 down to 0 (single digit numbers!) e) now inlining i also save some bytes. f) no need to name your main function. According to our meta, Haskell values are considered proper functions, so drop the v=.

... All in all 215 bytes Try it online!

Another 3 bytes to save: instead of the list comprehension you can use >>= (concatMap) from the list monad and inline concat in function l. Try it online!

Batch, 267 bytes
@echo off
set r=i
set t= There's a hole
set s=bottom of the sea
for %%w in (hole log bump frog wart hair fly flea smile)do call:c %%w
exit/b
:c
set s=%1 %r%n the %s%
echo%t:~,11%%s%
echo%t:~,11%%s%
echo%t%,%t:T=t%
echo%t%%s:~-25%
echo(
if %1==log set r=o

t contains a string repeated in the chorus, s contains most of the verse line, while r chooses between in the and on the. In the verses, only the first 11 characters of t is needed, while in the first chorus line the second copy of t has its T lowercased and the second chorus line reuses the last 25 characters of s.

JavaScript (Babel Node), 239 bytes
-7 bytes from @Oliver *.*
(x=0,r='hole0log0bump0frog0wart0hair0fly0flea0smile'.split`0`).map(a=>(t=(i="There's a ")+a+r.slice(0,x++).reverse().map((h,_)=>` ${"io"[_<x-2|0]}n the ${h}`).join``+(o=` in the bottom of the sea
`))+t+(`${k=i+"hole"}, ${k}
`)+k+o).join`
`

Try it online!

Te second T on the 3rd line of each verse should be lowercase.

Python 3, 213 206 198 193 bytes
k='n the ';o=e='bottom of the sea\n';b="There's a ";h='hole'
for j in[h]+'log bump frog wart hair fly smile'.split():o=j+' '+'io'['g'in o]+k+o;print(b+o+b+o+b+h+', t'+b[1:]+h+'\n'+b+h+' i'+k+e)

Try it online!

-15 bytes thanks to @Sara
-5  bytes thanks to @ASCII-only
Probably a bit more golfable, but not much.

198 bytes

@SaraJ Thanks. I was under the (clearly mistaken) impression that o=e= would make both o and e refer to the same object. I also thought split would be longer.

@ArtemisFowl o and e do refer to the same object... it's just that strings are immutable in Python so things like += will create a new copy instead of mutating the existing one

193

@ASCII-only I know, but I thought that python somehow made sure that they continued to refer to the same object.

@ArtemisFowl why. that's counterintuitive

@ASCII-only I know, I just subconsciously assummed it. I never really thought about it.

Clean, 267 bytes
import StdEnv,Text,Data.List
t="here's a "
h="hole"
b=" in the bottom of the sea"
f=foldr((+)o\s#p="T"+t+join" on the "(reverse s)+" in the "+h+b
=join"\n"[p,p,"T"+t+h+", t"+t+h+"\nT"+t+h+b+"\n\n"])""(tl(inits["log","bump","frog","wart","hair","fly","flea","smile"]))

Try it online!

Charcoal, 115 106 bytes
≔There's a holeθＥＥ⁹⁺…θχ⪫⮌…⪪”↶±∧⟲!↶⁼,(_⎇ＲB↧ω⪪zθⅉＱθ`✳＆⬤⸿◧σ⁻y▷»ΣＫ▶↙⁻υＸ`SξQ6 /ι⁹Ｗq”x⁺²ιn the ⟦ιι⁺⁺θ, ↧θ⁺θ✂ι±²⁵

Try it online! Link is to verbose version of code. Edit: Saved 9 bytes by copying my Batch code for the last line of the chorus. Explanation:
≔There's a holeθ

Save the string There's a hole, which is used twice as-is, a third time in lower case, and also a fourth time but just the first 10 characters.
⪪”↶±∧⟲!↶⁼,(_⎇ＲB↧ω⪪zθⅉＱθ`✳＆⬤⸿◧σ⁻y▷»ΣＫ▶↙⁻υＸ`SξQ6 /ι⁹Ｗq”x

Split the string bottom of the seaxhole ixlog ixbump oxfrog oxwart oxhair oxfly oxflea oxsmile o on xs.
Ｅ⁹⁺…θχ⪫⮌…...⁺²ιn the

Loop over the 9 verses, taking the first i+2 elements of the array, reversing them, joining them with n the, and prefixing There's a to the result.
Ｅ...⟦ιι⁺⁺θ, ↧θ⁺θ✂ι±²⁵

Expand each line into a verse by duplicating the line and constructing the chorus. Each line of the verse is then implicitly printed on each own line, and each verse is implicitly separated by a blank line.

cQuents, 238 219 bytes
|@
#36::"T"~c1)~j\rbk));@ )~c2,Z,"T"~c1)~"hole, t"~c1)~"hole","T"~c1)~c2)~@

::"","log in the","bump"~c3,"frog"~c3,"wart"~c3,"hair"~c3,"fly"~c3,"flea"~c3,"smile"~c3
:"here's a ","hole in the bottom of the sea"," on the"

Try it online!
This challenge made me finally implement lists and strings in my language. This language is built for integer sequences, so it did pretty well!
Explanation
:"here's a ","hole in the bottom of the sea"," on the"

    helper line: c1), c2), and c3) access the three terms in this list

::"","log in the","bump"~c3,"frog"~c3,"wart"~c3,"hair"~c3,"fly"~c3,"flea"~c3,"smile"~c3

    helper line: yields a list containing the first n terms in it, accessed with bx)
    for example, the first three terms are:

"","log in the","bump"~c3

    so b3) would yield ["","log in the","bump on the"] (~ is concatenation and c3 is " on the")

|@
#36::"T"~c1)~j\rbk));@ )~c2,Z,"T"~c1)~"hole, t"~c1)~"hole","T"~c1)~c2)~@

|@
                              join sequence on literal newline
#36::                         output first 36 terms in sequence joined together
                              following are the 4 terms in the sequence, which will cycle through 9 times (for a total of 36 terms)
"T"~c1)~j\rbk));@ )~c2,       first term
"T"~c1)~                      "T" concat "here's a " concat
        j\rbk));@ )           the first k terms of b, reversed, and joined on " "
                   ~c2,       concat "hole in the bottom of the sea"
Z,                            second term - same as previous
"T"~c1)~"hole, t"~c1)~"hole", third term
"T"~c1)~                      "T" concat "here's a " concat
        "hole, t"~c1)~"hole", "hole, t" concat "here's a " concat "hole"
"T"~c1)~c2)~@
                              fourth term - "T" concat "here's a " concat "hole on the bottom of the sea" concat newline

Perl 5, 194 bytes
@ASCII-only shaved off 6 bytes with literal newlines and a \l trick I forgot about
$"=" on the ";say+($b=($e="There's a ").hole,$c=" in the bottom of the sea",$/)x2,$.="$b, \l$b
$b$c
";say"$e@a[-$_..-1] in the hole$c
"x2,$.for 1..(@a=qw/smile flea fly hair wart frog bump log/)

Try it online!

194?

Yup.  Nice work.  I should have remembered the newlines for certain.  I've seen the \l before, but never had a reason to use it, so never thought of it.

190?

well this didn't work. neither did this

closer

also, just realized there's a 154 byte answer lol

:), i didn't see this answer before posting

That's OK.  Yours is a lot better.  That's what I was trying to get to, but wasn't able to figure it out.

C# (Visual C# Interactive Compiler), 220 bytes
string b="There's a ",d="hole in the bottom of the sea\n",e,f;" log bump frog wart hair fly flea smile".Split().Any(s=>Write((e=b+(f=s!=""?s+(f!=""?" o":" i")+"n the "+f:s)+d)+e+b+$@"hole, there's a hole
{b+d}
")is int);

Try it online!
-5 bytes thanks to @ASCIIOnly and -2 bytes thanks to @someone!
I have a small child and can assure you this song is equal parts catchy and annoying.

I'm sorry to have reminded you that it exists :o)

.Any() -> !=""?

also 223

and you don't need the space after in in the foreach >_>

@ASCIIOnly - Thanks for the tips :)

220 bytes by getting rid of foreach

@someone - nice trick and glad to see one of my old answers getting some attention.

V, 184 170 bytes
4iThere's a hole in the bottom of the sea
kky5w5eá,lpD5brtHj4yyGp4w8ion the 2briilog 3bibump 3bifrog 3biwart 3bihair 3bifly 3biflea 3bismile 7ñ4yykp4wd3wñ8ñÄ5jñ

Try it online!
Explanation:

4iThere's a hole in the bottom of the sea<\n><esc> Insert "Theres' a hole in the bottom of the sea" 4 times.
kk Move to the third line
y5w copy "There's a hole"
5eá, insert a comma after "There's a hole"
lp paste after the comma
D delete the rest of the line
5brt lowercase the second T
Hj4yy copy 4 lines from the second line
Gp Paste everything after the first line
4w8ion the <esc>(at the end of the first verse) move to first "hole" in second verse and insert "on the " 8 times
2briilog <esc> move backwards to the last "on", replace the o with an i and then insert "log "
3bibump <esc>3bifrog <esc>3biwart <esc>3bihair <esc>3bifly <esc>3biflea <esc>3bismile <esc> Move backwards through the line, inserting the appropriate words between each "on the"
7ñ4yykp4wd3wñ execute 4yykp4wd3w 7 times

4yykp duplicate the verse before this one
4wd3w move to the first word after "There's a hole" and delete 3 words

8ñÄ5jñ duplicate the first line of each verse after the first (there are 8 of these to do)

Slashalash, 216 bytes
/V/\/\///U/\/ VS/TCVR/iBVQUtheVPUoBVOUholeVN/RASVM/ASO, tCO
SA
VL/RMSVKUlog VJUbumpPKVIUfrogPJVHUwartPIVGUhairPHVFUflyPGVEUfleaPFVDUsmilePEVC/here's aVB/nQVA/O R bottom ofQ sea
/SASMSKNKLJNJLINILHNHLGNGLFNFLENELDNDRM

Try it online!
This sort of task is the one and only thing that Slashalash is reasonably good at. :D Hey, the result is shorter than C, C# or Java!
The output from this program ends in two trailing line breaks; hope that's not a deal-breaker.
Anyway, there's no real cleverness here. I simply identified repeated strings and defined one-character shortcuts for them, and repeated until I didn't see any more repeated strings. I did this in a more-or-less naive and greedy fashion. I did, however, intentionally define a shortcut for "smile on the flea on the ... sea", followed by "flea on the fly on the ... sea", and so forth, in order to form a chain of shortcuts. The result is that the whole sequence of new nouns is clearly visible in the code, and I find that pretty pleasing. :)
After V and U are replaced, we have the following more readable code:
/S/TC//R/iB//Q/ the//P/ oB//O/ hole//N/RAS//M/ASO, tCO
SA
//L/RMS//K/ log //J/ bumpPK//I/ frogPJ//H/ wartPI//G/ hairPH//F/ flyPG//E/ fleaPF//D/ smilePE//C/here's a//B/nQ//A/O R bottom ofQ sea
/SASMSKNKLJNJLINILHNHLGNGLFNFLENELDNDRM

LaTeX, 265 268 characters
\documentclass{book}\input{pgffor}\def\i{bottom of the sea}\let~\i\def\b{here's a }\def\h{hole}\def\s#1{ in}\begin{document}\foreach\x in{\h\s,log\s,bump,frog,wart,hair,fly,flea,smile}{\xdef~{\x{ on} the ~}T\b~\\T\b~\\T\b\h, t\b\h\\T\b\h\,in the \i\par}\enddocument

compiles into a nice PDF, with paragraph indentations and everything.
Ungolfed and commented:
\documentclass{book}
\input{pgffor}
\def\i{bottom of the sea}   %for re-use in the last two verses
\let~\i                     %here I keep attaching words
\def\b{here's a }
\def\h{hole}
\def\s#1{ in}               %this replaces the next token with "in", useful for log and hole where "in" is used instead of"on"
\begin{document}
\foreach\x in{\h\s,log\s,bump,frog,wart,hair,fly,flea,smile}{
    \xdef~{\x{ on} the ~}   %keep attaching words and on/on to ~
    T\b~\\                  %verse 1
    T\b~\\                  %verse 2
    T\b\h, t\b\h\\          %verse 3
    T\b\h\,in the \i\par    %verse 4
}
\enddocument

Of output:

Shell, 291 bytes
echo 'smile,flea,fly,hair,wart,frog,bump,log,hole'|awk -F, 'BEGIN{z="here'\''s a ";a="T"z;c=a "hole";b=" in the bottom of the sea"}function f(n){printf a $n;for(j=n+1;j<=NF;j++){printf " on the " $j};print b;}{for(i=NF;i>=1;i--){printf (i<NF)?"\n":"";f(i);f(i);print c", t" z "hole";f(NF)}}'

I'm sure it can be golfed further (definitions of vars & function) ...

C# (.NET Core), 315, 320, 290 bytes
EDIT:  Forgot to repeat the first line.  :C
EDIT2:  Thanks to recursive for -30 bytes!  Switched to using a .Split() to form the string array and added a really cool switch for flipping between "in" and "on".
s=>{var b="hole/log/bump/frog/wart/hair/fly/flea/smile/here's a / in the bottom of the sea\n".Split('/');string c=b[9]+b[0],t="";for(int k,j=0;j<9;t=""){t+="T"+b[9];for(k=j++;k>-1;k--)t+=b[k]+(k<1?"":" "+"oi"[1/k]+"n the ");t+=b[10];t+=t+"T"+c+", t"+c+"\n"+"T"+c+b[10]+"\n";s+=t;}return s;}

Try it online!

Unfortunately your answer is currently invalid, as it doesn't repeat the first line of each verse.

Missed it!  Now fixed, ty Sok.

Few tweaks for you: https://tio.run/##LZAxa8MwEIX3/IpDS2xkR/HYKkqHQqcWCil0cD3IjhwrtqUgnVNCyG93ZbsIcad3H0@Pq3xaWafGwWtzgsPNo@r5quqk9/Dp7MnJ/r4CuAxlpyvwKDGUq9VH@JDaRPE0BHgbTLXz6IJHspQ9HEGMXuzvV@mgFKSxnWKdPbFy6C@sDtbsVzpkjdSO1d0tXCWZ73XAGuXU2oMEBtoANgpKi2h7sPX88kr@GLI5XDqN0ZqtY758CpUo86eClvm2SFAQwmvrIm0Q2uQstvy8e@KTHN@RCvJF6ETPTCvOlPJ2n2a8TdM4jMu8LWjU7rIXQp4JEEqsJnnGgkqWTCTmM5dti6lBOjlWlCSAcw0R/6WZmQXuA8gfTuHgDHj@GPlqWfrm1RofdrT5dhrVuzYqOkYhasxXj3DGPw

Really liked the "oi"[1/k] part for switching between on/in.  Ty recursive.

Java (OpenJDK 8), 320 344 bytes
Long but wanted to try with java, no streams and java 8 things.
*Edited to fix some problems.
static String w(){String[]a={"hole","log","bump","frog","wart","hair","fly","flea","smile"};String n="T",m="t",q=" ",t="here's a ",s="bottom of the sea \n",y="in the ",o="on the ",b=t+a[0],f="",v,l="\n",c=y+s,h=a[0]+q+c,z=n+b+", "+m+b+q+l+n+b+q+c;for (int i=0;i<9;i++){v=n+t;for(int j=i;j>0;j--){v+=a[j]+q+(j>1?o:y);}v+=h;f+=v+v+z+l;}return f;}

Try it online!

there are two problems the spaces before the commas and the uppercase after comma, otherwise you can check translation of my answers 282 bytes

269 bytes using lambda notation

@Shaggy You are right, it is fixed now :)

@NahuelFouilleul 264 bytes

261 bytes

Good for you guys :)

ink, 231 229 bytes
LIST W=hole,log,bump,frog,wart,hair,fly,flea,smile
VAR T="here's a "
~temp H=T+"hole"
VAR B="bottom of the sea"
-(i)~W=W((i+1)/2)
T{T}<>
-(k){W} {W-2:o|i}n the <>
~W--
{W:->k}{B}
{i%2:->i}
T{H}, t{H}
T{H} in the {B}
\
{i<17:->i}

Try it online!

-2 bytes by changing "{T}hole" to T+"hole" and removing a rogue space

Zsh, 162 bytes
set hole in the 'bottom of the sea'
0="There's a "
alias D="<<<\"$0\$@
$0\$@
$0$1, ${0:l}$1
$0$*
\"&&4=$"@
D
for 1 (log bump frog wart hair fly flea smile)D&&2=on
Attempt This Online!

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
A Multipurpose Quine
I personally love quines, but they all seem to be so... static. So why not create a quine that can do more.
Challenge
The challenge here is to create a quine that without any sort of input is a normal quine. Then if it receives a different input, it outputs a different quine in a different language. (basically like a polyglot, but it doesn't have to return to the original source code)
EX:
Starting program:
James

Given no input or 0 as input, the code above outputs:
James

Given 1 as input, the code outputs:
Kendra

Given 2 as input, the code outputs:
Alexander

And so on...
Requirements
Like with any other quine challenge, no examining source code directly!
Inputs are either nothing, or a positive integer.
Each quine must not be less than \$\lceil(n/4)\rceil\$ levenshtein distance from all other quines, where \$n\$ is the length of the original quine. Look at this example program:
Bobb  //original quine
Bobby //output (when given an input), we'll name him bobby
Bob   //output (when given a different input), we'll name him bob

The above is not valid, because Bob is only one levenshtein distance from Bobb.
However, this one is valid:
Bob      //original quine
Alice    //bob's output when given 1 as input
Geronimo //bob's output when given 2 as an input

Because \$ ceil(len(bob)/4)=1 \$, and Alice, Geronimo, and Bob are all at more than one levenshtein distance away from each other.
There has to be a minimum of one extra quine to be outputted.
The quine must output itself when given no input or 0, and output a different quine if given a different integer input!
Points
Points are based on this equation (courtesy of Luis felipe De jesus Munoz)
$${\frac{100}{\text{bytes}} \cdot 2^{\text{extra quines} - 1}}$$
(100 divided by the number of bytes multiplied by 2 to the power of every different quine that your program can output, minus one to make sure the program at least outputs one different quine)

Comments are not for extended discussion; this conversation has been moved to chat.

Seems really close to the quine chaining challenge without as good of a specification.

I'm sorry, but this question is still entirely unclear. An extra quine only counts when it is not just appending, deleting or inserting characters into another quine format. That means that the outputs cannot be altercations of each other, nor can they be altercations of the original. Every string is just some other string with characters deleted and/or inserted. So the task would be impossible. And it's not clear what you mean by "altercation". Also, you didn't say anything about polyglots in the spec.

I suggest stating that each quine must be at least n levenshtein distance from each other, where n is a number of your choosing.

https://en.m.wikipedia.org/wiki/Levenshtein_distance

I think this new edit makes this challenge meet the requirements of this site. I would cast a reopen vote if I could, but the system doesn't let me because I cast one already before.

I have created a post on meta for you: https://codegolf.meta.stackexchange.com/questions/17365/should-a-multipurpose-quine-be-reopened

This doesn't really stop me from outputting infinite quines that are more than n/4 characters away from each other, e.g. the ><> quines 'rd3*>o<, 'rd3*>o<0000, 'rd3*>o<00000000 etc.

What constitutes a different language here?  Our "default" definition is to say that different implementations are different languages (see here) which is quite fine grained and might not be suited to the challenge.  Did you mean something else?

Befunge-98, ><>, Fission, Wumpus, Cardinal, Gol><> and Beeswax, Score: \$(100/103)*2^6 = 62.136\$
"[0#34o+]l2:)&o@.0*74#!,!?:o#_4F.~6.@1~0@D~FJR'!+!7,++tttt=++%88-$@,kJ'$.k+bf:k+bfj*a!:&,k-.#!0+df+c+f7

Try it online!
Verification!
When given an input of 0, this program produces itself. When given a different number, it produces the quines in the format
"[0#34o+]l2:)&o@.0*74#!,!?:o1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #_4F.~6.@1~0@D~FJR'!+!7,++tttt=++%88-$@,kJ'$.k+bf:k+bfj*a!:&,k-.#!0+df+c+f7

Where the 1s are the input number. Since there are 26 copies of the 1, this makes each quine distinct at least \$bytes/4\$ Levenshtein distance. The quines are entirely interchangeable as no program actually cares about the number part. I might see if I can add some more 2D languages to this (I'm thinking Cardinal Gol><> next) Don't have one in mind right now.

Very nice, this is really good, I'm guessing here that most of these output quines work in each language you are using, since they all look like they are the same format

Try adding mystic runes, or Lost

@KrystosTheOverlord I don't know Mystic Runes (perhaps you mean Runic Enhancements? I don't really know that either), and Lost would be terrible, since it would have to be multi-line. I'm currently working on adding Beeswax

I meant Runic enchantments (I knew i got the name wrong), also, good job with the number of quines you have managed, you have really embodied this challenge

JAVA -> ><>, (100/460 bytes)*2^0 = a score of .217... yay
import java.util.Scanner;public class M{public static void main(String args[]){Scanner i=new Scanner(System.in);String s="import java.util.Scanner;public class M{public static void main(String args[]){Scanner i=new Scanner(System.in);String s=%c%s%c;if(i.nextInt()==0){System.out.printf(s,34,s,34,34,34);return;}System.out.println(%c'r3d*d8*7+e0p>>|%c);}}";if(i.nextInt()==0){System.out.printf(s,34,s,34,34,34);return;}System.out.println("'r3d*d8*7+e0p>>|");}}

I'm not winning my own challenge, but this should serve as an example.
If it gets and input of 0 then it outputs the java quine, if it receives a 1 then it outputs a ><> quine (courtesy of mbomb007). And that is it...


text:
Make a longer lenguage program
Lenguage is a brainfuck dialect that is notorious for breaking source restriction challenges.  That is because Lenguage cares only about the length of it's source and not the contents.
First, the length of the program is calculated. Then, said length is converted to binary and left-padded by zeroes to a multiple of 3. The resulting binary string is split into chunks of 3 bits each of which is translated into a brainfuck command as such:
000 -> +
001 -> -
010 -> >
011 -> <
100 -> .
101 -> ,
110 -> [
111 -> ]

Finally the program is run as brainfuck1.
From here the challenge is pretty simple, write a lenguage program that takes no input and produces an output consisting of one byte repeated integer \$n\$ times, where \$n\$ is strictly greater than the length of your program.
Answers will be scored in bytes with fewer bytes being better.
Here's a hacky program to calculate lenguage from brainfuck

1: For this challenge we will use wrapping cells and a non-wrapping tape.

+[.] Do I win? :P

Perhaps it might be more interesting to score on the length of the output?

@JoKing That's a good idea.  Unfortunately it appears to be a bit late for that.

@Quintec Well, programs can''t have a leading + so no

For future reference, just because nobody has posted a solution to your challenge yet (or, in this case, only 1 person has) doesn't mean that there aren't people working on solutions that could be affected by a major change to a challenge's rules/spec.

@Jo King We can still do .+[.]

Also, why is this tagged quine?

@EmbodimentofIgnorance produces an output consisting of **one byte** repeated n times though something like >+[.] works. I assume that the output has to be finite

@TRITICIMAGVS I would add the following to the sentence "where $n$ is strictly greater than the length of your program": ", and where the output is finite.", as to prevent infinite loops printing characters.

@KevinCruijssen I've gone ahead and said that $n$ is an integer.

If I understand your description correctly, Lenguage is translated into Brainfuck such that a longer L. program translates into a longer B. program and a shorter L. program translates into a shorter B. program. This is code golf. So why ask for L. programs rather than simply for B. programs with output of length at least 2^(3n)?

@msh210 That'll do the trick most of the time, but there are a few differences, for example different Brainfuck characters cost different amounts (+ is the cheapest and ] the most expensive) and of course it matters where in the program they are.  While $2^{3n}$ is a good estimate it is not exactly equivalent.

@EmbodimentofIgnorance Indeed, changed it to self-referential, which was split off from quine for exactly this sort of thing.

8437495638205698686671 bytes
This translates to the brainfuck program:
-[>>[>]+[->[>]+.[<]+<]<-]

Which prints exactly \$231584178474632390847141970017375815706539969331281128078915168015826259279614\$ SOH bytes.
This is calculated by the function
f(n)=2*f(n-1)+n
f(0)=0

with an input of 255.
Explanation:
-[         Loop 255 times
  >>[>]    Move to the end of a series of positive cells (initially empty)
  +        Add one cell to the end
  [-       Loop over each cell
    >[>]+  Add one cell to the end
    .      Print a SOH byte
    [<]+   Restore current cell
  <]       Move to next cell
<-]        Decrement counter

9093903938998324939360576240306155985031832511491088836321985855167849863863065731015823 bytes
>>>>>>-[[->>>+<<<]------>>>-]<<<[<<<]+[+[>>>]<<<->+[<[+>-]>[-<<<<->+>>------>>]<<<<]>>-[<<<].>>>-]

Which prints exactly
298333629248008269731638612618517353495058861384016275770860733328251135402804732197446995616017112134460464130233444058136509123809012106419446593183683387659250431692751255099808162970657410517657862174602556590616568690423540284801267472920128909691902547970614008613488242333460665145840144517097342073878746293059960326132795671583153307437896728515625000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

(\$250^{255}\$) NUL bytes.
Credit goes to @hvd in this Brainfuck answer, so make sure to upvote him!
Explanation:
I was going to write an explanation of my own, but realized @hvd's explanation is already on point, so I'll quote it here instead:

>>>>>> is needed to leave a bit of working space.
- produces 255 (since 0 - 1 = 255 when we have wrapping cells).
[[->>>+<<<]------>>>-] turns this into 255 copies of the value 250,
  giving a tape that looks like:
0 0 0 0 0 0 250 0 0 250 0 0 ... 250 0 0 [0]

<<<[<<<]+ moves the data pointer back and finishes up the initial
  data:
0 0 0 [1] 0 0 250 0 0 250 0 0 ...

Then comes the loop: [+...-] initially sets the 1 to a 2, which gets
  set back to 1 at the end of the loop. The loop terminates when the
  loop body already set 2 to 1.
Now, the numbers 2 250 250 250 ... 250 represent a counter, in base
  250, with each number one greater than the digit it represents.

[>>>]<<< moves all the way to the right. Since each digit is represented by a non-zero number, this is trivial.
->+[<[+>-]>[-<<<<->+>>------>>]<<<<]>>- decreases the counter by 1. Starting with the last digit: the digit gets decremented. If it remains positive, we're done. If it turns to zero, set it to 250, and
  continue with the digit before.
[<<<].>>> moves the pointer back before the left-most digit, and this is a nice moment to print a NUL byte. Then re-position to exactly
  the left-most digit, to see if we're done.

To verify correctness, change the initial - to + to print
  2501 NUL bytes, ++ for 2502, etc.

19326644346528796447 bytes
Brainfuck code:
>+[+[[+>->-<<]->>+].<]

Prints
57896044618658097711785492504343953926634992332820282019728792003956564819967

null bytes.
It works like this:
mem[i]=255;
do
    while(--mem[i]){
        mem[i+1]=mem[i+2]=mem[i];
        mem[i]=1;
        i+=2;
    }
while(mem[--i]);

Quite straightforward recursion.


text:
This ain't it Chief
This is mostly for the memes. I regret existing.
Rules

Your code has to output, by either printing or showing in stdout, the phrase This ain't it Chief. in that exact format.
You can only use the characters from the phrase in either format of

UTF-8 (Aa Cc Ee Ff Hh Ii Nn Tt Ss . ')
or hex bytes (41 61 20 43 63 20 45 65 20 46 66 20 48 68 20 49 69 20 4e 6e 20 54 74 20 53 73 20 2e 20 27)

No inputs are allowed via stdin or any form of user input.
Use JSFiddle, CodePen, etc. to prove your code works (or a screenshot if needed?)

Answer Formatting
 #Language - Code length in bytes
    some code
 #Comments, laughs, etc.

Scoring

This is code golf, so shortest code in bytes wins.

Welcome to PPCG! I suggest using the Sandbox for future challenge ideas: this site has a long history, and many simple ideas for challenges turn out to be duplicate or unpopular for various reasons.

Fair enough. I do have an idea though, I'll edit the question.

@lirtosiast What about now?

I reopened the question as it is no longer a duplicate. You should clarify what exactly You can only use characters from the phrase "This ain't it Chief." means. Only the characters '. CTaefhinst may appear in the source? Or only their corresponding byte values? Or maybe switching case is allowed?

okay, thank you! I'll clarify a bit more!

I still see 3 problems with this challenge: 1. In most languages this is impossible as printing anything requires print("") or similar boilerplate. 2. Allowing a letter but not its byte value is a bit nonsensical, since all code is some sequence of bytes. Many languages don't use ASCII, and we wouldn't want to exclude those. 3. The overall winner will almost surely be in languages like /// that print the source unchanged in this circumstance.

Do we really need to print "This ain't it Chief." rather than This ain't it Chief.? May we use the " character?

@JonathanAllan I fixed that, I didn't realize I left the quotes still.

@lirtosiast I went over those points and changed the question accordingly, as well as clarified the rules of the challenge quite a bit more.

Are we allowed to use ' character for the ain't or do we need to somehow construct that character? Secondly, it would probably be best to spell out exactly what characters (byte sequences) are allowed, just so there's no ambiguity. Interesting challenge, otherwise.

@AdmBorkBork there we go, final clarification!

Are you sure you are not missing the s in the list of allowed characters?

you should also include the uppercase letters in the list of allowed characters

@altocumulus Added Ss to the list.

@JoKing I edited the question to do so.

FYI, the answer formatting bit isn't needed. Nor is the bit about JSfiddle. Try It Online generates such things already and supports over 600 languages. Very few languages used here aren't on TIO. As for the challenge itself, I don't think any language can work with that instruction set except by sheer coincidence (or intentional design for this challenge).

CJam, 40 bytes
'T'h'i's' 'a'i'n'''t' 'i't' 'C'h'i'e'f'.

Try it online!
Explanation: 'T pushes a T to the stack, etc. CJam has an implicit output.

Japt, 43 bytes
'.ifieiiihi'CiSitiiiSiti''iniiiaiSisiiihi'T

Try it

Draco18s: As for the challenge itself, I don't think any language can work with that instruction set except by sheer coincidence

This is one such coincidence; Japt's i method prepends its argument to the string it's applied to.

APL (Dyalog Unicode), 22 bytes
A function returning the string, just for the lols.
'This ain''t it Chief'

Try it online!

Draco18s: As for the challenge itself, I don't think any language can work with that instruction set except by sheer coincidence

This is one such coincidence; You just need to type '' to escape a ' character, instead of using \'.

A, 1.07e192 bytes
insert 1070535411808274876356555204541421987893453317986634005193363842599488570060956068723122679013084672793132737522449327487355527954547514152318677638703786440293483566302887576787267171423983556 A's here

Obligatory Lenguage (well this isn't Lenguage but you know what I mean) answer.
Try the brainfuck online!

Your esolangs link for the language doesn’t work

@caird coinheringaahing Fixed.

The C of the last word isn't capitalized.

And it was also missing the period at the end. Anyways, fixed.