Sing Baby Shark












4












$begingroup$



"Baby Shark" is a children's song about a family of sharks. Having long been popular as a campfire song, it has been popularized since the mid-2000s by social media, online video and radio. - Wikipedia




Write program that takes no input, and writes the following text to the standard output or an arbitrary file:



Baby Shark doo doo doo doo doo doo
Baby Shark doo doo doo doo doo doo
Baby Shark doo doo doo doo doo doo
Baby Shark!
Daddy Shark doo doo doo doo doo doo
Daddy Shark doo doo doo doo doo doo
Daddy Shark doo doo doo doo doo doo
Daddy Shark!
Mommy Shark doo doo doo doo doo doo
Mommy Shark doo doo doo doo doo doo
Mommy Shark doo doo doo doo doo doo
Mommy Shark!
Grandpa Shark doo doo doo doo doo doo
Grandpa Shark doo doo doo doo doo doo
Grandpa Shark doo doo doo doo doo doo
Grandpa Shark!
Grandma Shark doo doo doo doo doo doo
Grandma Shark doo doo doo doo doo doo
Grandma Shark doo doo doo doo doo doo
Grandma Shark!


This is code golf — shortest code wins.



Found this on Reddit^1^2, and it seems like an interesting challenge to golf.










share|improve this question







New contributor




ReverseCold is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







$endgroup$








  • 1




    $begingroup$
    Is a newline between each stanza (each shark) acceptable? (That's always how I've seen the lyrics written)
    $endgroup$
    – Quintec
    1 hour ago


















4












$begingroup$



"Baby Shark" is a children's song about a family of sharks. Having long been popular as a campfire song, it has been popularized since the mid-2000s by social media, online video and radio. - Wikipedia




Write program that takes no input, and writes the following text to the standard output or an arbitrary file:



Baby Shark doo doo doo doo doo doo
Baby Shark doo doo doo doo doo doo
Baby Shark doo doo doo doo doo doo
Baby Shark!
Daddy Shark doo doo doo doo doo doo
Daddy Shark doo doo doo doo doo doo
Daddy Shark doo doo doo doo doo doo
Daddy Shark!
Mommy Shark doo doo doo doo doo doo
Mommy Shark doo doo doo doo doo doo
Mommy Shark doo doo doo doo doo doo
Mommy Shark!
Grandpa Shark doo doo doo doo doo doo
Grandpa Shark doo doo doo doo doo doo
Grandpa Shark doo doo doo doo doo doo
Grandpa Shark!
Grandma Shark doo doo doo doo doo doo
Grandma Shark doo doo doo doo doo doo
Grandma Shark doo doo doo doo doo doo
Grandma Shark!


This is code golf — shortest code wins.



Found this on Reddit^1^2, and it seems like an interesting challenge to golf.










share|improve this question







New contributor




ReverseCold is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







$endgroup$








  • 1




    $begingroup$
    Is a newline between each stanza (each shark) acceptable? (That's always how I've seen the lyrics written)
    $endgroup$
    – Quintec
    1 hour ago
















4












4








4


1



$begingroup$



"Baby Shark" is a children's song about a family of sharks. Having long been popular as a campfire song, it has been popularized since the mid-2000s by social media, online video and radio. - Wikipedia




Write program that takes no input, and writes the following text to the standard output or an arbitrary file:



Baby Shark doo doo doo doo doo doo
Baby Shark doo doo doo doo doo doo
Baby Shark doo doo doo doo doo doo
Baby Shark!
Daddy Shark doo doo doo doo doo doo
Daddy Shark doo doo doo doo doo doo
Daddy Shark doo doo doo doo doo doo
Daddy Shark!
Mommy Shark doo doo doo doo doo doo
Mommy Shark doo doo doo doo doo doo
Mommy Shark doo doo doo doo doo doo
Mommy Shark!
Grandpa Shark doo doo doo doo doo doo
Grandpa Shark doo doo doo doo doo doo
Grandpa Shark doo doo doo doo doo doo
Grandpa Shark!
Grandma Shark doo doo doo doo doo doo
Grandma Shark doo doo doo doo doo doo
Grandma Shark doo doo doo doo doo doo
Grandma Shark!


This is code golf — shortest code wins.



Found this on Reddit^1^2, and it seems like an interesting challenge to golf.










share|improve this question







New contributor




ReverseCold is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







$endgroup$





"Baby Shark" is a children's song about a family of sharks. Having long been popular as a campfire song, it has been popularized since the mid-2000s by social media, online video and radio. - Wikipedia




Write program that takes no input, and writes the following text to the standard output or an arbitrary file:



Baby Shark doo doo doo doo doo doo
Baby Shark doo doo doo doo doo doo
Baby Shark doo doo doo doo doo doo
Baby Shark!
Daddy Shark doo doo doo doo doo doo
Daddy Shark doo doo doo doo doo doo
Daddy Shark doo doo doo doo doo doo
Daddy Shark!
Mommy Shark doo doo doo doo doo doo
Mommy Shark doo doo doo doo doo doo
Mommy Shark doo doo doo doo doo doo
Mommy Shark!
Grandpa Shark doo doo doo doo doo doo
Grandpa Shark doo doo doo doo doo doo
Grandpa Shark doo doo doo doo doo doo
Grandpa Shark!
Grandma Shark doo doo doo doo doo doo
Grandma Shark doo doo doo doo doo doo
Grandma Shark doo doo doo doo doo doo
Grandma Shark!


This is code golf — shortest code wins.



Found this on Reddit^1^2, and it seems like an interesting challenge to golf.







code-golf string kolmogorov-complexity






share|improve this question







New contributor




ReverseCold is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question







New contributor




ReverseCold is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question






New contributor




ReverseCold is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 1 hour ago









ReverseColdReverseCold

1314




1314




New contributor




ReverseCold is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





ReverseCold is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






ReverseCold is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








  • 1




    $begingroup$
    Is a newline between each stanza (each shark) acceptable? (That's always how I've seen the lyrics written)
    $endgroup$
    – Quintec
    1 hour ago
















  • 1




    $begingroup$
    Is a newline between each stanza (each shark) acceptable? (That's always how I've seen the lyrics written)
    $endgroup$
    – Quintec
    1 hour ago










1




1




$begingroup$
Is a newline between each stanza (each shark) acceptable? (That's always how I've seen the lyrics written)
$endgroup$
– Quintec
1 hour ago






$begingroup$
Is a newline between each stanza (each shark) acceptable? (That's always how I've seen the lyrics written)
$endgroup$
– Quintec
1 hour ago












7 Answers
7






active

oldest

votes


















2












$begingroup$


Retina 0.8.2, 77 75 bytes




Baby¶Daddy¶Mommy¶Grandpa¶Grandma
.+
$&s$&s$&s$&S!
s
S6$*O¶
O
doo
S
Shark


Try it online! Explanation:




Baby¶Daddy¶Mommy¶Grandpa¶Grandma


Insert the relations on separate lines.



.+
$&s$&s$&s$&S!¶


Expand into four lines.



s
S6$*O¶
O
doo
S
Shark


Expand the placeholders.



69 bytes in Retina 1:




Baby¶Daddy¶Mommy¶Grandpa¶Grandma
.+
$& Shark
.+
3*$($&6*$( doo)¶)$&!


Try it online! Explanation:




Baby¶Daddy¶Mommy¶Grandpa¶Grandma


Insert the relations on separate lines.



.+
$& Shark


Append Shark to each.



.+
3*$($&6*$( doo)¶)$&!


Expand into whole verses.






share|improve this answer











$endgroup$





















    1












    $begingroup$

    Python 3, 105 97 bytes



    for x in"Baby","Daddy","Mommy","Grandpa","Grandma":print((x+' Shark'+' doo'*6+"n")*3+x,"Shark!")


    Try it online!



    A simple Python 3 solution. (8 bytes saved by Jo King and Quintec)






    share|improve this answer










    New contributor




    ReverseCold is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.






    $endgroup$









    • 1




      $begingroup$
      The parentheses around ' doo'*6 are unnecessary and you have unnecessary whitespace there
      $endgroup$
      – Quintec
      1 hour ago






    • 1




      $begingroup$
      What quintec said... 97 bytes
      $endgroup$
      – Jo King
      1 hour ago










    • $begingroup$
      Huh, didn't know you could do lists without , or that you didn't need a newline for :. Thanks!
      $endgroup$
      – ReverseCold
      55 mins ago










    • $begingroup$
      @ReverseCold technically where there's no it's a tuple not a list, but that's not relevant to this program
      $endgroup$
      – Stephen
      9 mins ago



















    1












    $begingroup$


    Perl 6, 79 78 bytes





    (<Baby Daddy Mommmy Grandpa Grandma>X~" Shark"X~ |((" doo"x 6)xx 3),'!')>>.say


    Try it online!



    Pretty simple.



    Explanation:



     <...>X~                                  # Combine family members
    " Shark"X~ # With "Shark" and
    |((" doo"x 6)xx 3) # doo repeated 6 times then 3 times
    ,'!' # Then !
    ( )>>.say # And print each line





    share|improve this answer











    $endgroup$





















      0












      $begingroup$

      PowerShell, 88 86 85 bytes



      "Baby0Daddy0Mommy0Grandpa0Grandma"-split0|%{("$_ Shark"+" doo"*6+"`r")*3;"$_ Shark!"}


      Try it online!



      Just to get the ball rolling.






      share|improve this answer











      $endgroup$





















        0












        $begingroup$


        Python 2, 93 bytes





        for w in"Baby Daddy Mommy Grandpa Grandma".split():w+=" Shark";print(w+" doo"*6+"n")*3+w+"!"


        Try it online!



        94 bytes





        for w in"Baby Daddy Mommy Grandpa Grandma".split():print((" doo"*6+"n%s Shark"%w)*4)[25:]+"!"


        Try it online!






        share|improve this answer









        $endgroup$





















          0












          $begingroup$


          C# (Visual C# Interactive Compiler), 153 bytes





          foreach(var i in"Baby Daddy Mommy Grandpa Grandma".Split())Write(string.Concat(Enumerable.Repeat(i+" Shark doo doo doo doo doo doon",3))+i+" Shark!n");


          Try it online!






          share|improve this answer









          $endgroup$





















            0












            $begingroup$


            cQuents, 93 89 bytes



            |
            #20&bk)~" Shark"~(" doo"6,Z,Z,bk)~" Shark!"
            :"Baby","Daddy","Mommy","Grandpa","Grandma"


            Try it online!



            Note that as of posting TIO is not updated to the latest version, so the TIO link may not work.



            Explanation



            |                               Set delimiter to newline
            #20 n = 20
            & Output first n terms in sequence
            k = 1
            First term is
            bk)~" Shark" kth term from the third line concatenated to " Shark"
            ~(" doo"6, concatenated to " doo" repeated 6 times
            Z,Z, Second and third terms equal the first term
            bk)~" Shark!" Fourth term is the kth term from the third line concatenated to " Shark!"
            k += 1, restart

            Third line 5 terms, each a string





            share|improve this answer











            $endgroup$













              Your Answer





              StackExchange.ifUsing("editor", function () {
              return StackExchange.using("mathjaxEditing", function () {
              StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
              StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["\$", "\$"]]);
              });
              });
              }, "mathjax-editing");

              StackExchange.ifUsing("editor", function () {
              StackExchange.using("externalEditor", function () {
              StackExchange.using("snippets", function () {
              StackExchange.snippets.init();
              });
              });
              }, "code-snippets");

              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "200"
              };
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function() {
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled) {
              StackExchange.using("snippets", function() {
              createEditor();
              });
              }
              else {
              createEditor();
              }
              });

              function createEditor() {
              StackExchange.prepareEditor({
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: false,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: null,
              bindNavPrevention: true,
              postfix: "",
              imageUploader: {
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              },
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              });


              }
              });






              ReverseCold is a new contributor. Be nice, and check out our Code of Conduct.










              draft saved

              draft discarded


















              StackExchange.ready(
              function () {
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodegolf.stackexchange.com%2fquestions%2f179998%2fsing-baby-shark%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              7 Answers
              7






              active

              oldest

              votes








              7 Answers
              7






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              2












              $begingroup$


              Retina 0.8.2, 77 75 bytes




              Baby¶Daddy¶Mommy¶Grandpa¶Grandma
              .+
              $&s$&s$&s$&S!
              s
              S6$*O¶
              O
              doo
              S
              Shark


              Try it online! Explanation:




              Baby¶Daddy¶Mommy¶Grandpa¶Grandma


              Insert the relations on separate lines.



              .+
              $&s$&s$&s$&S!¶


              Expand into four lines.



              s
              S6$*O¶
              O
              doo
              S
              Shark


              Expand the placeholders.



              69 bytes in Retina 1:




              Baby¶Daddy¶Mommy¶Grandpa¶Grandma
              .+
              $& Shark
              .+
              3*$($&6*$( doo)¶)$&!


              Try it online! Explanation:




              Baby¶Daddy¶Mommy¶Grandpa¶Grandma


              Insert the relations on separate lines.



              .+
              $& Shark


              Append Shark to each.



              .+
              3*$($&6*$( doo)¶)$&!


              Expand into whole verses.






              share|improve this answer











              $endgroup$


















                2












                $begingroup$


                Retina 0.8.2, 77 75 bytes




                Baby¶Daddy¶Mommy¶Grandpa¶Grandma
                .+
                $&s$&s$&s$&S!
                s
                S6$*O¶
                O
                doo
                S
                Shark


                Try it online! Explanation:




                Baby¶Daddy¶Mommy¶Grandpa¶Grandma


                Insert the relations on separate lines.



                .+
                $&s$&s$&s$&S!¶


                Expand into four lines.



                s
                S6$*O¶
                O
                doo
                S
                Shark


                Expand the placeholders.



                69 bytes in Retina 1:




                Baby¶Daddy¶Mommy¶Grandpa¶Grandma
                .+
                $& Shark
                .+
                3*$($&6*$( doo)¶)$&!


                Try it online! Explanation:




                Baby¶Daddy¶Mommy¶Grandpa¶Grandma


                Insert the relations on separate lines.



                .+
                $& Shark


                Append Shark to each.



                .+
                3*$($&6*$( doo)¶)$&!


                Expand into whole verses.






                share|improve this answer











                $endgroup$
















                  2












                  2








                  2





                  $begingroup$


                  Retina 0.8.2, 77 75 bytes




                  Baby¶Daddy¶Mommy¶Grandpa¶Grandma
                  .+
                  $&s$&s$&s$&S!
                  s
                  S6$*O¶
                  O
                  doo
                  S
                  Shark


                  Try it online! Explanation:




                  Baby¶Daddy¶Mommy¶Grandpa¶Grandma


                  Insert the relations on separate lines.



                  .+
                  $&s$&s$&s$&S!¶


                  Expand into four lines.



                  s
                  S6$*O¶
                  O
                  doo
                  S
                  Shark


                  Expand the placeholders.



                  69 bytes in Retina 1:




                  Baby¶Daddy¶Mommy¶Grandpa¶Grandma
                  .+
                  $& Shark
                  .+
                  3*$($&6*$( doo)¶)$&!


                  Try it online! Explanation:




                  Baby¶Daddy¶Mommy¶Grandpa¶Grandma


                  Insert the relations on separate lines.



                  .+
                  $& Shark


                  Append Shark to each.



                  .+
                  3*$($&6*$( doo)¶)$&!


                  Expand into whole verses.






                  share|improve this answer











                  $endgroup$




                  Retina 0.8.2, 77 75 bytes




                  Baby¶Daddy¶Mommy¶Grandpa¶Grandma
                  .+
                  $&s$&s$&s$&S!
                  s
                  S6$*O¶
                  O
                  doo
                  S
                  Shark


                  Try it online! Explanation:




                  Baby¶Daddy¶Mommy¶Grandpa¶Grandma


                  Insert the relations on separate lines.



                  .+
                  $&s$&s$&s$&S!¶


                  Expand into four lines.



                  s
                  S6$*O¶
                  O
                  doo
                  S
                  Shark


                  Expand the placeholders.



                  69 bytes in Retina 1:




                  Baby¶Daddy¶Mommy¶Grandpa¶Grandma
                  .+
                  $& Shark
                  .+
                  3*$($&6*$( doo)¶)$&!


                  Try it online! Explanation:




                  Baby¶Daddy¶Mommy¶Grandpa¶Grandma


                  Insert the relations on separate lines.



                  .+
                  $& Shark


                  Append Shark to each.



                  .+
                  3*$($&6*$( doo)¶)$&!


                  Expand into whole verses.







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited 55 mins ago

























                  answered 1 hour ago









                  NeilNeil

                  80.7k744178




                  80.7k744178























                      1












                      $begingroup$

                      Python 3, 105 97 bytes



                      for x in"Baby","Daddy","Mommy","Grandpa","Grandma":print((x+' Shark'+' doo'*6+"n")*3+x,"Shark!")


                      Try it online!



                      A simple Python 3 solution. (8 bytes saved by Jo King and Quintec)






                      share|improve this answer










                      New contributor




                      ReverseCold is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                      Check out our Code of Conduct.






                      $endgroup$









                      • 1




                        $begingroup$
                        The parentheses around ' doo'*6 are unnecessary and you have unnecessary whitespace there
                        $endgroup$
                        – Quintec
                        1 hour ago






                      • 1




                        $begingroup$
                        What quintec said... 97 bytes
                        $endgroup$
                        – Jo King
                        1 hour ago










                      • $begingroup$
                        Huh, didn't know you could do lists without , or that you didn't need a newline for :. Thanks!
                        $endgroup$
                        – ReverseCold
                        55 mins ago










                      • $begingroup$
                        @ReverseCold technically where there's no it's a tuple not a list, but that's not relevant to this program
                        $endgroup$
                        – Stephen
                        9 mins ago
















                      1












                      $begingroup$

                      Python 3, 105 97 bytes



                      for x in"Baby","Daddy","Mommy","Grandpa","Grandma":print((x+' Shark'+' doo'*6+"n")*3+x,"Shark!")


                      Try it online!



                      A simple Python 3 solution. (8 bytes saved by Jo King and Quintec)






                      share|improve this answer










                      New contributor




                      ReverseCold is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                      Check out our Code of Conduct.






                      $endgroup$









                      • 1




                        $begingroup$
                        The parentheses around ' doo'*6 are unnecessary and you have unnecessary whitespace there
                        $endgroup$
                        – Quintec
                        1 hour ago






                      • 1




                        $begingroup$
                        What quintec said... 97 bytes
                        $endgroup$
                        – Jo King
                        1 hour ago










                      • $begingroup$
                        Huh, didn't know you could do lists without , or that you didn't need a newline for :. Thanks!
                        $endgroup$
                        – ReverseCold
                        55 mins ago










                      • $begingroup$
                        @ReverseCold technically where there's no it's a tuple not a list, but that's not relevant to this program
                        $endgroup$
                        – Stephen
                        9 mins ago














                      1












                      1








                      1





                      $begingroup$

                      Python 3, 105 97 bytes



                      for x in"Baby","Daddy","Mommy","Grandpa","Grandma":print((x+' Shark'+' doo'*6+"n")*3+x,"Shark!")


                      Try it online!



                      A simple Python 3 solution. (8 bytes saved by Jo King and Quintec)






                      share|improve this answer










                      New contributor




                      ReverseCold is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                      Check out our Code of Conduct.






                      $endgroup$



                      Python 3, 105 97 bytes



                      for x in"Baby","Daddy","Mommy","Grandpa","Grandma":print((x+' Shark'+' doo'*6+"n")*3+x,"Shark!")


                      Try it online!



                      A simple Python 3 solution. (8 bytes saved by Jo King and Quintec)







                      share|improve this answer










                      New contributor




                      ReverseCold is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                      Check out our Code of Conduct.









                      share|improve this answer



                      share|improve this answer








                      edited 56 mins ago





















                      New contributor




                      ReverseCold is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                      Check out our Code of Conduct.









                      answered 1 hour ago









                      ReverseColdReverseCold

                      1314




                      1314




                      New contributor




                      ReverseCold is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                      Check out our Code of Conduct.





                      New contributor





                      ReverseCold is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                      Check out our Code of Conduct.






                      ReverseCold is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                      Check out our Code of Conduct.








                      • 1




                        $begingroup$
                        The parentheses around ' doo'*6 are unnecessary and you have unnecessary whitespace there
                        $endgroup$
                        – Quintec
                        1 hour ago






                      • 1




                        $begingroup$
                        What quintec said... 97 bytes
                        $endgroup$
                        – Jo King
                        1 hour ago










                      • $begingroup$
                        Huh, didn't know you could do lists without , or that you didn't need a newline for :. Thanks!
                        $endgroup$
                        – ReverseCold
                        55 mins ago










                      • $begingroup$
                        @ReverseCold technically where there's no it's a tuple not a list, but that's not relevant to this program
                        $endgroup$
                        – Stephen
                        9 mins ago














                      • 1




                        $begingroup$
                        The parentheses around ' doo'*6 are unnecessary and you have unnecessary whitespace there
                        $endgroup$
                        – Quintec
                        1 hour ago






                      • 1




                        $begingroup$
                        What quintec said... 97 bytes
                        $endgroup$
                        – Jo King
                        1 hour ago










                      • $begingroup$
                        Huh, didn't know you could do lists without , or that you didn't need a newline for :. Thanks!
                        $endgroup$
                        – ReverseCold
                        55 mins ago










                      • $begingroup$
                        @ReverseCold technically where there's no it's a tuple not a list, but that's not relevant to this program
                        $endgroup$
                        – Stephen
                        9 mins ago








                      1




                      1




                      $begingroup$
                      The parentheses around ' doo'*6 are unnecessary and you have unnecessary whitespace there
                      $endgroup$
                      – Quintec
                      1 hour ago




                      $begingroup$
                      The parentheses around ' doo'*6 are unnecessary and you have unnecessary whitespace there
                      $endgroup$
                      – Quintec
                      1 hour ago




                      1




                      1




                      $begingroup$
                      What quintec said... 97 bytes
                      $endgroup$
                      – Jo King
                      1 hour ago




                      $begingroup$
                      What quintec said... 97 bytes
                      $endgroup$
                      – Jo King
                      1 hour ago












                      $begingroup$
                      Huh, didn't know you could do lists without , or that you didn't need a newline for :. Thanks!
                      $endgroup$
                      – ReverseCold
                      55 mins ago




                      $begingroup$
                      Huh, didn't know you could do lists without , or that you didn't need a newline for :. Thanks!
                      $endgroup$
                      – ReverseCold
                      55 mins ago












                      $begingroup$
                      @ReverseCold technically where there's no it's a tuple not a list, but that's not relevant to this program
                      $endgroup$
                      – Stephen
                      9 mins ago




                      $begingroup$
                      @ReverseCold technically where there's no it's a tuple not a list, but that's not relevant to this program
                      $endgroup$
                      – Stephen
                      9 mins ago











                      1












                      $begingroup$


                      Perl 6, 79 78 bytes





                      (<Baby Daddy Mommmy Grandpa Grandma>X~" Shark"X~ |((" doo"x 6)xx 3),'!')>>.say


                      Try it online!



                      Pretty simple.



                      Explanation:



                       <...>X~                                  # Combine family members
                      " Shark"X~ # With "Shark" and
                      |((" doo"x 6)xx 3) # doo repeated 6 times then 3 times
                      ,'!' # Then !
                      ( )>>.say # And print each line





                      share|improve this answer











                      $endgroup$


















                        1












                        $begingroup$


                        Perl 6, 79 78 bytes





                        (<Baby Daddy Mommmy Grandpa Grandma>X~" Shark"X~ |((" doo"x 6)xx 3),'!')>>.say


                        Try it online!



                        Pretty simple.



                        Explanation:



                         <...>X~                                  # Combine family members
                        " Shark"X~ # With "Shark" and
                        |((" doo"x 6)xx 3) # doo repeated 6 times then 3 times
                        ,'!' # Then !
                        ( )>>.say # And print each line





                        share|improve this answer











                        $endgroup$
















                          1












                          1








                          1





                          $begingroup$


                          Perl 6, 79 78 bytes





                          (<Baby Daddy Mommmy Grandpa Grandma>X~" Shark"X~ |((" doo"x 6)xx 3),'!')>>.say


                          Try it online!



                          Pretty simple.



                          Explanation:



                           <...>X~                                  # Combine family members
                          " Shark"X~ # With "Shark" and
                          |((" doo"x 6)xx 3) # doo repeated 6 times then 3 times
                          ,'!' # Then !
                          ( )>>.say # And print each line





                          share|improve this answer











                          $endgroup$




                          Perl 6, 79 78 bytes





                          (<Baby Daddy Mommmy Grandpa Grandma>X~" Shark"X~ |((" doo"x 6)xx 3),'!')>>.say


                          Try it online!



                          Pretty simple.



                          Explanation:



                           <...>X~                                  # Combine family members
                          " Shark"X~ # With "Shark" and
                          |((" doo"x 6)xx 3) # doo repeated 6 times then 3 times
                          ,'!' # Then !
                          ( )>>.say # And print each line






                          share|improve this answer














                          share|improve this answer



                          share|improve this answer








                          edited 28 mins ago

























                          answered 1 hour ago









                          Jo KingJo King

                          22.9k253120




                          22.9k253120























                              0












                              $begingroup$

                              PowerShell, 88 86 85 bytes



                              "Baby0Daddy0Mommy0Grandpa0Grandma"-split0|%{("$_ Shark"+" doo"*6+"`r")*3;"$_ Shark!"}


                              Try it online!



                              Just to get the ball rolling.






                              share|improve this answer











                              $endgroup$


















                                0












                                $begingroup$

                                PowerShell, 88 86 85 bytes



                                "Baby0Daddy0Mommy0Grandpa0Grandma"-split0|%{("$_ Shark"+" doo"*6+"`r")*3;"$_ Shark!"}


                                Try it online!



                                Just to get the ball rolling.






                                share|improve this answer











                                $endgroup$
















                                  0












                                  0








                                  0





                                  $begingroup$

                                  PowerShell, 88 86 85 bytes



                                  "Baby0Daddy0Mommy0Grandpa0Grandma"-split0|%{("$_ Shark"+" doo"*6+"`r")*3;"$_ Shark!"}


                                  Try it online!



                                  Just to get the ball rolling.






                                  share|improve this answer











                                  $endgroup$



                                  PowerShell, 88 86 85 bytes



                                  "Baby0Daddy0Mommy0Grandpa0Grandma"-split0|%{("$_ Shark"+" doo"*6+"`r")*3;"$_ Shark!"}


                                  Try it online!



                                  Just to get the ball rolling.







                                  share|improve this answer














                                  share|improve this answer



                                  share|improve this answer








                                  edited 1 hour ago

























                                  answered 1 hour ago









                                  Gabriel MillsGabriel Mills

                                  301210




                                  301210























                                      0












                                      $begingroup$


                                      Python 2, 93 bytes





                                      for w in"Baby Daddy Mommy Grandpa Grandma".split():w+=" Shark";print(w+" doo"*6+"n")*3+w+"!"


                                      Try it online!



                                      94 bytes





                                      for w in"Baby Daddy Mommy Grandpa Grandma".split():print((" doo"*6+"n%s Shark"%w)*4)[25:]+"!"


                                      Try it online!






                                      share|improve this answer









                                      $endgroup$


















                                        0












                                        $begingroup$


                                        Python 2, 93 bytes





                                        for w in"Baby Daddy Mommy Grandpa Grandma".split():w+=" Shark";print(w+" doo"*6+"n")*3+w+"!"


                                        Try it online!



                                        94 bytes





                                        for w in"Baby Daddy Mommy Grandpa Grandma".split():print((" doo"*6+"n%s Shark"%w)*4)[25:]+"!"


                                        Try it online!






                                        share|improve this answer









                                        $endgroup$
















                                          0












                                          0








                                          0





                                          $begingroup$


                                          Python 2, 93 bytes





                                          for w in"Baby Daddy Mommy Grandpa Grandma".split():w+=" Shark";print(w+" doo"*6+"n")*3+w+"!"


                                          Try it online!



                                          94 bytes





                                          for w in"Baby Daddy Mommy Grandpa Grandma".split():print((" doo"*6+"n%s Shark"%w)*4)[25:]+"!"


                                          Try it online!






                                          share|improve this answer









                                          $endgroup$




                                          Python 2, 93 bytes





                                          for w in"Baby Daddy Mommy Grandpa Grandma".split():w+=" Shark";print(w+" doo"*6+"n")*3+w+"!"


                                          Try it online!



                                          94 bytes





                                          for w in"Baby Daddy Mommy Grandpa Grandma".split():print((" doo"*6+"n%s Shark"%w)*4)[25:]+"!"


                                          Try it online!







                                          share|improve this answer












                                          share|improve this answer



                                          share|improve this answer










                                          answered 17 mins ago









                                          xnorxnor

                                          90.5k18185439




                                          90.5k18185439























                                              0












                                              $begingroup$


                                              C# (Visual C# Interactive Compiler), 153 bytes





                                              foreach(var i in"Baby Daddy Mommy Grandpa Grandma".Split())Write(string.Concat(Enumerable.Repeat(i+" Shark doo doo doo doo doo doon",3))+i+" Shark!n");


                                              Try it online!






                                              share|improve this answer









                                              $endgroup$


















                                                0












                                                $begingroup$


                                                C# (Visual C# Interactive Compiler), 153 bytes





                                                foreach(var i in"Baby Daddy Mommy Grandpa Grandma".Split())Write(string.Concat(Enumerable.Repeat(i+" Shark doo doo doo doo doo doon",3))+i+" Shark!n");


                                                Try it online!






                                                share|improve this answer









                                                $endgroup$
















                                                  0












                                                  0








                                                  0





                                                  $begingroup$


                                                  C# (Visual C# Interactive Compiler), 153 bytes





                                                  foreach(var i in"Baby Daddy Mommy Grandpa Grandma".Split())Write(string.Concat(Enumerable.Repeat(i+" Shark doo doo doo doo doo doon",3))+i+" Shark!n");


                                                  Try it online!






                                                  share|improve this answer









                                                  $endgroup$




                                                  C# (Visual C# Interactive Compiler), 153 bytes





                                                  foreach(var i in"Baby Daddy Mommy Grandpa Grandma".Split())Write(string.Concat(Enumerable.Repeat(i+" Shark doo doo doo doo doo doon",3))+i+" Shark!n");


                                                  Try it online!







                                                  share|improve this answer












                                                  share|improve this answer



                                                  share|improve this answer










                                                  answered 10 mins ago









                                                  Embodiment of IgnoranceEmbodiment of Ignorance

                                                  980119




                                                  980119























                                                      0












                                                      $begingroup$


                                                      cQuents, 93 89 bytes



                                                      |
                                                      #20&bk)~" Shark"~(" doo"6,Z,Z,bk)~" Shark!"
                                                      :"Baby","Daddy","Mommy","Grandpa","Grandma"


                                                      Try it online!



                                                      Note that as of posting TIO is not updated to the latest version, so the TIO link may not work.



                                                      Explanation



                                                      |                               Set delimiter to newline
                                                      #20 n = 20
                                                      & Output first n terms in sequence
                                                      k = 1
                                                      First term is
                                                      bk)~" Shark" kth term from the third line concatenated to " Shark"
                                                      ~(" doo"6, concatenated to " doo" repeated 6 times
                                                      Z,Z, Second and third terms equal the first term
                                                      bk)~" Shark!" Fourth term is the kth term from the third line concatenated to " Shark!"
                                                      k += 1, restart

                                                      Third line 5 terms, each a string





                                                      share|improve this answer











                                                      $endgroup$


















                                                        0












                                                        $begingroup$


                                                        cQuents, 93 89 bytes



                                                        |
                                                        #20&bk)~" Shark"~(" doo"6,Z,Z,bk)~" Shark!"
                                                        :"Baby","Daddy","Mommy","Grandpa","Grandma"


                                                        Try it online!



                                                        Note that as of posting TIO is not updated to the latest version, so the TIO link may not work.



                                                        Explanation



                                                        |                               Set delimiter to newline
                                                        #20 n = 20
                                                        & Output first n terms in sequence
                                                        k = 1
                                                        First term is
                                                        bk)~" Shark" kth term from the third line concatenated to " Shark"
                                                        ~(" doo"6, concatenated to " doo" repeated 6 times
                                                        Z,Z, Second and third terms equal the first term
                                                        bk)~" Shark!" Fourth term is the kth term from the third line concatenated to " Shark!"
                                                        k += 1, restart

                                                        Third line 5 terms, each a string





                                                        share|improve this answer











                                                        $endgroup$
















                                                          0












                                                          0








                                                          0





                                                          $begingroup$


                                                          cQuents, 93 89 bytes



                                                          |
                                                          #20&bk)~" Shark"~(" doo"6,Z,Z,bk)~" Shark!"
                                                          :"Baby","Daddy","Mommy","Grandpa","Grandma"


                                                          Try it online!



                                                          Note that as of posting TIO is not updated to the latest version, so the TIO link may not work.



                                                          Explanation



                                                          |                               Set delimiter to newline
                                                          #20 n = 20
                                                          & Output first n terms in sequence
                                                          k = 1
                                                          First term is
                                                          bk)~" Shark" kth term from the third line concatenated to " Shark"
                                                          ~(" doo"6, concatenated to " doo" repeated 6 times
                                                          Z,Z, Second and third terms equal the first term
                                                          bk)~" Shark!" Fourth term is the kth term from the third line concatenated to " Shark!"
                                                          k += 1, restart

                                                          Third line 5 terms, each a string





                                                          share|improve this answer











                                                          $endgroup$




                                                          cQuents, 93 89 bytes



                                                          |
                                                          #20&bk)~" Shark"~(" doo"6,Z,Z,bk)~" Shark!"
                                                          :"Baby","Daddy","Mommy","Grandpa","Grandma"


                                                          Try it online!



                                                          Note that as of posting TIO is not updated to the latest version, so the TIO link may not work.



                                                          Explanation



                                                          |                               Set delimiter to newline
                                                          #20 n = 20
                                                          & Output first n terms in sequence
                                                          k = 1
                                                          First term is
                                                          bk)~" Shark" kth term from the third line concatenated to " Shark"
                                                          ~(" doo"6, concatenated to " doo" repeated 6 times
                                                          Z,Z, Second and third terms equal the first term
                                                          bk)~" Shark!" Fourth term is the kth term from the third line concatenated to " Shark!"
                                                          k += 1, restart

                                                          Third line 5 terms, each a string






                                                          share|improve this answer














                                                          share|improve this answer



                                                          share|improve this answer








                                                          edited 4 mins ago

























                                                          answered 16 mins ago









                                                          StephenStephen

                                                          7,32823295




                                                          7,32823295






















                                                              ReverseCold is a new contributor. Be nice, and check out our Code of Conduct.










                                                              draft saved

                                                              draft discarded


















                                                              ReverseCold is a new contributor. Be nice, and check out our Code of Conduct.













                                                              ReverseCold is a new contributor. Be nice, and check out our Code of Conduct.












                                                              ReverseCold is a new contributor. Be nice, and check out our Code of Conduct.
















                                                              If this is an answer to a challenge…




                                                              • …Be sure to follow the challenge specification. However, please refrain from exploiting obvious loopholes. Answers abusing any of the standard loopholes are considered invalid. If you think a specification is unclear or underspecified, comment on the question instead.


                                                              • …Try to optimize your score. For instance, answers to code-golf challenges should attempt to be as short as possible. You can always include a readable version of the code in addition to the competitive one.
                                                                Explanations of your answer make it more interesting to read and are very much encouraged.


                                                              • …Include a short header which indicates the language(s) of your code and its score, as defined by the challenge.



                                                              More generally…




                                                              • …Please make sure to answer the question and provide sufficient detail.


                                                              • …Avoid asking for help, clarification or responding to other answers (use comments instead).





                                                              draft saved


                                                              draft discarded














                                                              StackExchange.ready(
                                                              function () {
                                                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodegolf.stackexchange.com%2fquestions%2f179998%2fsing-baby-shark%23new-answer', 'question_page');
                                                              }
                                                              );

                                                              Post as a guest















                                                              Required, but never shown





















































                                                              Required, but never shown














                                                              Required, but never shown












                                                              Required, but never shown







                                                              Required, but never shown

































                                                              Required, but never shown














                                                              Required, but never shown












                                                              Required, but never shown







                                                              Required, but never shown







                                                              Popular posts from this blog

                                                              Accessing regular linux commands in Huawei's Dopra Linux

                                                              Can't connect RFCOMM socket: Host is down

                                                              Kernel panic - not syncing: Fatal Exception in Interrupt