Inquiry answererTips for golfing in 05AB1EFlippin' SquaresProgram your favorite phraseReverse sentencesPrint some JSONFind the original string, without the repetition without the repetition in the middleRemove Spaces, Maintaining CapitalizationRest of the path

What was the earliest microcomputer Logo language implementation?

Is it possible that the shadow of The Moon is a single dot during solar eclipse?

What are A and A* conference ranks?

What is the maximum viable speed for a projectile within earth's atmosphere?

Delete empty subfolders, keep parent folder

Why are two-stroke engines nearly unheard of in aviation?

Where did Otto von Bismarck say "lying awake all night, hating"?

In Bb5 systems against the Sicilian, why does White exchange their b5 bishop without playing a6?

Why has the UK has not yet signed a continuity trade agreement with Turkey?

Who are the people reviewing far more papers than they're submitting for review?

Microservices and Stored Procedures

Floating Point XOR

How do you determine which representation of a function to use for Newton's method?

MySQL - How to check for a value in all columns

Plausibility and performance of a composite longbow

What is Cousin Itt in The Addams Family?

Python web-scraper to download table of transistor counts from Wikipedia

Exam design: give maximum score per question or not?

What is this WWII four-engine plane on skis?

Resampling 1000m resolution Aqua MODIS images to 30m resolution

Why do IXPs need ASN?

How to convert String to DateTime without time zone conversion?

How do we know that black holes are spinning?

How to make classical firearms effective on space habitats despite the coriolis effect?



Inquiry answerer


Tips for golfing in 05AB1EFlippin' SquaresProgram your favorite phraseReverse sentencesPrint some JSONFind the original string, without the repetition without the repetition in the middleRemove Spaces, Maintaining CapitalizationRest of the path






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








7












$begingroup$



  • Original: https://james-iry.blogspot.co.at/2009/05/brief-incomplete-and-mostly-wrong.html




    Alain Colmerauer designed the logic programming language Prolog. His goal was to create a programming language that is as intelligent as a two-year-old child. In order to prove that he had succeeded in his goal, he presented a Prolog program that answers "No" resourcefully for all inquiries.

    Ask me anything!

    ?-




  • (Of course he didn't.) Your task is to create a program that is more intelligent than Alain Colmerauer's program. This does not have to be in Prolog.


Specifics



  • If input ends with ? and has at least one ,, return text from the last , until before the last ?.


  • Else, if input ends with ? return No.


  • Else, return Yes.


Rules



  • No standard loopholes.

  • Input/output will be taken via our standard input/output methods.

  • Your program has to take at least 1 inquiry.

  • You should output the processed inquiry.

  • The Yes and No's are case-sensitive in the examples.

  • You are guaranteed that if the input includes a ?, the input will only have one ? and it will always be the last character.

  • The input will always be a phrase/sentence. This phrase/sentence will never only contain the characters , and ?, e.g. ,, ?, and ,? are not valid inputs. (Although submissions might implement it anyway, since the phrase/sentence is an empty string in these cases.)

  • If there is whitespace immediately after the last , or immediately before the ?, they should be included in the output.

Examples



Hmm. -> Yes
Alright, -> Yes
Ask me anything! -> Yes
Ask me a question, please! -> Yes
Are you okay? -> No
No? -> No
Hey,does this program work? -> does this program work

Quotes in the following test cases should not be outputted.
They are used as a delimiter here.

Okay, so this does work ? -> " so this does work "
Please, add, a, test, case, containing, multiple, commas? -> " commas"


Scoring



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










share|improve this question











$endgroup$









  • 5




    $begingroup$
    Are we guaranteed that if the input includes a ?, there will only be one and it will always be the last character?
    $endgroup$
    – Shaggy
    7 hours ago






  • 2




    $begingroup$
    Please add a test case containing multiple commas.
    $endgroup$
    – manatwork
    7 hours ago






  • 4




    $begingroup$
    Accepting an answer early may discourage other users from posting new answers, because it kind of looks like the challenge is done.
    $endgroup$
    – Arnauld
    5 hours ago






  • 2




    $begingroup$
    You are guaranteed that if the input includes a ?, the input will only have one ? and it will always be the last character. Therefore these test cases are unneccecary.
    $endgroup$
    – A _
    3 hours ago






  • 1




    $begingroup$
    Is ends with ,? a valid input?
    $endgroup$
    – GammaFunction
    1 hour ago

















7












$begingroup$



  • Original: https://james-iry.blogspot.co.at/2009/05/brief-incomplete-and-mostly-wrong.html




    Alain Colmerauer designed the logic programming language Prolog. His goal was to create a programming language that is as intelligent as a two-year-old child. In order to prove that he had succeeded in his goal, he presented a Prolog program that answers "No" resourcefully for all inquiries.

    Ask me anything!

    ?-




  • (Of course he didn't.) Your task is to create a program that is more intelligent than Alain Colmerauer's program. This does not have to be in Prolog.


Specifics



  • If input ends with ? and has at least one ,, return text from the last , until before the last ?.


  • Else, if input ends with ? return No.


  • Else, return Yes.


Rules



  • No standard loopholes.

  • Input/output will be taken via our standard input/output methods.

  • Your program has to take at least 1 inquiry.

  • You should output the processed inquiry.

  • The Yes and No's are case-sensitive in the examples.

  • You are guaranteed that if the input includes a ?, the input will only have one ? and it will always be the last character.

  • The input will always be a phrase/sentence. This phrase/sentence will never only contain the characters , and ?, e.g. ,, ?, and ,? are not valid inputs. (Although submissions might implement it anyway, since the phrase/sentence is an empty string in these cases.)

  • If there is whitespace immediately after the last , or immediately before the ?, they should be included in the output.

Examples



Hmm. -> Yes
Alright, -> Yes
Ask me anything! -> Yes
Ask me a question, please! -> Yes
Are you okay? -> No
No? -> No
Hey,does this program work? -> does this program work

Quotes in the following test cases should not be outputted.
They are used as a delimiter here.

Okay, so this does work ? -> " so this does work "
Please, add, a, test, case, containing, multiple, commas? -> " commas"


Scoring



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










share|improve this question











$endgroup$









  • 5




    $begingroup$
    Are we guaranteed that if the input includes a ?, there will only be one and it will always be the last character?
    $endgroup$
    – Shaggy
    7 hours ago






  • 2




    $begingroup$
    Please add a test case containing multiple commas.
    $endgroup$
    – manatwork
    7 hours ago






  • 4




    $begingroup$
    Accepting an answer early may discourage other users from posting new answers, because it kind of looks like the challenge is done.
    $endgroup$
    – Arnauld
    5 hours ago






  • 2




    $begingroup$
    You are guaranteed that if the input includes a ?, the input will only have one ? and it will always be the last character. Therefore these test cases are unneccecary.
    $endgroup$
    – A _
    3 hours ago






  • 1




    $begingroup$
    Is ends with ,? a valid input?
    $endgroup$
    – GammaFunction
    1 hour ago













7












7








7





$begingroup$



  • Original: https://james-iry.blogspot.co.at/2009/05/brief-incomplete-and-mostly-wrong.html




    Alain Colmerauer designed the logic programming language Prolog. His goal was to create a programming language that is as intelligent as a two-year-old child. In order to prove that he had succeeded in his goal, he presented a Prolog program that answers "No" resourcefully for all inquiries.

    Ask me anything!

    ?-




  • (Of course he didn't.) Your task is to create a program that is more intelligent than Alain Colmerauer's program. This does not have to be in Prolog.


Specifics



  • If input ends with ? and has at least one ,, return text from the last , until before the last ?.


  • Else, if input ends with ? return No.


  • Else, return Yes.


Rules



  • No standard loopholes.

  • Input/output will be taken via our standard input/output methods.

  • Your program has to take at least 1 inquiry.

  • You should output the processed inquiry.

  • The Yes and No's are case-sensitive in the examples.

  • You are guaranteed that if the input includes a ?, the input will only have one ? and it will always be the last character.

  • The input will always be a phrase/sentence. This phrase/sentence will never only contain the characters , and ?, e.g. ,, ?, and ,? are not valid inputs. (Although submissions might implement it anyway, since the phrase/sentence is an empty string in these cases.)

  • If there is whitespace immediately after the last , or immediately before the ?, they should be included in the output.

Examples



Hmm. -> Yes
Alright, -> Yes
Ask me anything! -> Yes
Ask me a question, please! -> Yes
Are you okay? -> No
No? -> No
Hey,does this program work? -> does this program work

Quotes in the following test cases should not be outputted.
They are used as a delimiter here.

Okay, so this does work ? -> " so this does work "
Please, add, a, test, case, containing, multiple, commas? -> " commas"


Scoring



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










share|improve this question











$endgroup$





  • Original: https://james-iry.blogspot.co.at/2009/05/brief-incomplete-and-mostly-wrong.html




    Alain Colmerauer designed the logic programming language Prolog. His goal was to create a programming language that is as intelligent as a two-year-old child. In order to prove that he had succeeded in his goal, he presented a Prolog program that answers "No" resourcefully for all inquiries.

    Ask me anything!

    ?-




  • (Of course he didn't.) Your task is to create a program that is more intelligent than Alain Colmerauer's program. This does not have to be in Prolog.


Specifics



  • If input ends with ? and has at least one ,, return text from the last , until before the last ?.


  • Else, if input ends with ? return No.


  • Else, return Yes.


Rules



  • No standard loopholes.

  • Input/output will be taken via our standard input/output methods.

  • Your program has to take at least 1 inquiry.

  • You should output the processed inquiry.

  • The Yes and No's are case-sensitive in the examples.

  • You are guaranteed that if the input includes a ?, the input will only have one ? and it will always be the last character.

  • The input will always be a phrase/sentence. This phrase/sentence will never only contain the characters , and ?, e.g. ,, ?, and ,? are not valid inputs. (Although submissions might implement it anyway, since the phrase/sentence is an empty string in these cases.)

  • If there is whitespace immediately after the last , or immediately before the ?, they should be included in the output.

Examples



Hmm. -> Yes
Alright, -> Yes
Ask me anything! -> Yes
Ask me a question, please! -> Yes
Are you okay? -> No
No? -> No
Hey,does this program work? -> does this program work

Quotes in the following test cases should not be outputted.
They are used as a delimiter here.

Okay, so this does work ? -> " so this does work "
Please, add, a, test, case, containing, multiple, commas? -> " commas"


Scoring



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







code-golf string






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 3 hours ago









Veskah

2,2475 silver badges24 bronze badges




2,2475 silver badges24 bronze badges










asked 8 hours ago









A _A _

1,9375 silver badges26 bronze badges




1,9375 silver badges26 bronze badges










  • 5




    $begingroup$
    Are we guaranteed that if the input includes a ?, there will only be one and it will always be the last character?
    $endgroup$
    – Shaggy
    7 hours ago






  • 2




    $begingroup$
    Please add a test case containing multiple commas.
    $endgroup$
    – manatwork
    7 hours ago






  • 4




    $begingroup$
    Accepting an answer early may discourage other users from posting new answers, because it kind of looks like the challenge is done.
    $endgroup$
    – Arnauld
    5 hours ago






  • 2




    $begingroup$
    You are guaranteed that if the input includes a ?, the input will only have one ? and it will always be the last character. Therefore these test cases are unneccecary.
    $endgroup$
    – A _
    3 hours ago






  • 1




    $begingroup$
    Is ends with ,? a valid input?
    $endgroup$
    – GammaFunction
    1 hour ago












  • 5




    $begingroup$
    Are we guaranteed that if the input includes a ?, there will only be one and it will always be the last character?
    $endgroup$
    – Shaggy
    7 hours ago






  • 2




    $begingroup$
    Please add a test case containing multiple commas.
    $endgroup$
    – manatwork
    7 hours ago






  • 4




    $begingroup$
    Accepting an answer early may discourage other users from posting new answers, because it kind of looks like the challenge is done.
    $endgroup$
    – Arnauld
    5 hours ago






  • 2




    $begingroup$
    You are guaranteed that if the input includes a ?, the input will only have one ? and it will always be the last character. Therefore these test cases are unneccecary.
    $endgroup$
    – A _
    3 hours ago






  • 1




    $begingroup$
    Is ends with ,? a valid input?
    $endgroup$
    – GammaFunction
    1 hour ago







5




5




$begingroup$
Are we guaranteed that if the input includes a ?, there will only be one and it will always be the last character?
$endgroup$
– Shaggy
7 hours ago




$begingroup$
Are we guaranteed that if the input includes a ?, there will only be one and it will always be the last character?
$endgroup$
– Shaggy
7 hours ago




2




2




$begingroup$
Please add a test case containing multiple commas.
$endgroup$
– manatwork
7 hours ago




$begingroup$
Please add a test case containing multiple commas.
$endgroup$
– manatwork
7 hours ago




4




4




$begingroup$
Accepting an answer early may discourage other users from posting new answers, because it kind of looks like the challenge is done.
$endgroup$
– Arnauld
5 hours ago




$begingroup$
Accepting an answer early may discourage other users from posting new answers, because it kind of looks like the challenge is done.
$endgroup$
– Arnauld
5 hours ago




2




2




$begingroup$
You are guaranteed that if the input includes a ?, the input will only have one ? and it will always be the last character. Therefore these test cases are unneccecary.
$endgroup$
– A _
3 hours ago




$begingroup$
You are guaranteed that if the input includes a ?, the input will only have one ? and it will always be the last character. Therefore these test cases are unneccecary.
$endgroup$
– A _
3 hours ago




1




1




$begingroup$
Is ends with ,? a valid input?
$endgroup$
– GammaFunction
1 hour ago




$begingroup$
Is ends with ,? a valid input?
$endgroup$
– GammaFunction
1 hour ago










17 Answers
17






active

oldest

votes


















4














$begingroup$


Python 3, 62 bytes





lambda s:['Yes',*s[:-1].split(','),'No'][~(','in s)*('?'in s)]


Try it online!



The expression ~(','in s)*('?'in s) evaluates to 0 (i.e. 'Yes') if the string does not contain a '?', else -1 (i.e. 'No') if the string does not contain a ',', and otherwise -2 (i.e. the last comma-separated section of the string excluding the last character).






share|improve this answer











$endgroup$






















    4














    $begingroup$


    05AB1E, 20 19 bytes



    '?åi',¡”€–”0ǝθ¨ë”…Ü


    -1 byte thanks to @Grimy.



    Try it online or verify all test cases.



    Explanation:





    '?åi '# If the (implicit) input contains a "?":
    ',¡ '# Split the (implicit) input on ","
    ”€–” # Push dictionary string "Not"
    0ǝ # Insert it at the first position (index 0) in the list
    θ # Then get the last item of the list
    ¨ # And remove the last character
    # (either the "?" of the original input; or the "t" in "Not")
    ë # Else:
    ”…Ü # Push dictionary string "Yes"
    # (after which the top of the stack is output implicitly as result)


    See this 05AB1E tip of mine (section How to use the dictionary?) to understand why ”€–” is "Not" and ”…Ü is "Yes".






    share|improve this answer











    $endgroup$










    • 1




      $begingroup$
      20
      $endgroup$
      – Grimy
      6 hours ago










    • $begingroup$
      @Grimy Oh, smart thinking. Thanks! :)
      $endgroup$
      – Kevin Cruijssen
      6 hours ago


















    4














    $begingroup$

    JavaScript (ES6),  53  52 bytes





    s=>(m=s.match(/(,?)([^,]*)?/))?m[1]?m[2]:'No':'Yes'


    Try it online!



    Commented



    s => // s = input string
    ( m = s.match( // m is the result of matching in s:
    // +------------> an optional comma
    // | +------> followed by a string containing no comma
    // | | +--> followed by a question mark
    // <--><-----><>
    /(,?)([^,]*)?/
    )) ? // if m is not null:
    m[1] ? // if the comma exists:
    m[2] // output the string following it
    : // else:
    'No' // output 'No'
    : // else:
    'Yes' // output 'Yes'





    share|improve this answer











    $endgroup$














    • $begingroup$
      Welp, was looking for a JS solution, ended up with something double this size.
      $endgroup$
      – The random guy
      8 hours ago


















    3














    $begingroup$


    Charcoal, 23 22 bytes



    ¿№θ?¿№θ,⁻⊟⪪θ,¦?¦No¦Yes


    Try it online! Link is to verbose version of code. Edit: Saved 1 byte thanks to @KevinCruijssen. Explanation:



    ¿№θ?


    Does the string contain any ?s?



    ¿№θ,


    Does it contain any ,s?



    ⊟⪪θ,


    Split the string on ,s and take the last.



    ⁻...?


    Delete the ? and output the result.



    No


    If there are no ,s then output No.



    Yes


    If there are no ?s then output Yes.






    share|improve this answer











    $endgroup$














    • $begingroup$
      -1 changing Print(Join(Split(Pop(Split(q, ",")), "?"), w) to Print(Minus(Pop(Split(q, ",")), "?");
      $endgroup$
      – Kevin Cruijssen
      4 hours ago










    • $begingroup$
      @KevinCruijssen Thanks, I'd forgotten that Minus did that. Besides, I was feeling pleased with myself for saving two separators.
      $endgroup$
      – Neil
      1 hour ago


















    2














    $begingroup$


    Perl 5 + -plF/,|?/, 27 bytes





    $_=/?$/?/,/?$F[$#F]:No:Yes


    Try it online!






    share|improve this answer









    $endgroup$






















      2














      $begingroup$


      Retina, 32 bytes



      .+[^?]$
      Yes
      .+,(.*)?
      $1
      .+?
      No


      Try it online.



      Explanation:



      Replace any input not ending with "?" with Yes:



      .+[^?]$
      Yes


      Replace any input containing a comma and ending with a "?" with the part between the comma and the "?" (captured in capture group 1):



      .+,(.*)?
      $1


      Replace any other input ending with a "?" with No:



      .+?
      No



      32 bytes alternative:



      ^/?/K`Yes
      .+,(.*)?
      $1
      /?/K`No


      K tip thanks to @Neil.



      Try it online.



      Explanation:



      The three steps are the same as above, but the K only looks at a partial match (? in this case). The ^ in the first line means a reverse, so if the input doesn't contain a ? it replaced it with Yes. And if the string does (still) contain a ? at the last line, it replaces it with No.






      share|improve this answer











      $endgroup$














      • $begingroup$
        Did you know that Retina 1's K stage has a built-in conditional? I didn't. It could probably save you a few bytes.
        $endgroup$
        – Neil
        4 hours ago










      • $begingroup$
        @Neil I'm not sure how to chain the K and conditional & to be completely honest. I know how to use K with a regex to match like this, but how do I combine it with the conditional to mimic a ternary if-else for the Yes/No?
        $endgroup$
        – Kevin Cruijssen
        3 hours ago










      • $begingroup$
        You don't need &, which is what surprised me, and you can just match on a string, or better still, a character, since you know that any ? must be at the end.
        $endgroup$
        – Neil
        1 hour ago










      • $begingroup$
        @Neil So, like this? Which is also 32 bytes apparently.
        $endgroup$
        – Kevin Cruijssen
        59 mins ago


















      1














      $begingroup$


      PHP, 58 bytes





      <?=$argn[-1]=='?'?substr(strrchr($argn,','),1,-1)?:No:Yes;


      Try it online!






      share|improve this answer











      $endgroup$














      • $begingroup$
        Prints No instead of the empty string in cases ending with ,?.
        $endgroup$
        – GammaFunction
        1 hour ago


















      1














      $begingroup$


      Red, 78 bytes



      func[s][r:"Yes"parse s[to","copy t to"?"(r: last split t",")| to"?"(r:"No")]r]


      Try it online!






      share|improve this answer









      $endgroup$






















        1














        $begingroup$


        Perl 6, 40 bytes








        Try it online!






        share|improve this answer









        $endgroup$






















          1














          $begingroup$

          IBM/Lotus Notes Formula, 79 bytes



          @If(@Ends(i;"?");@If(@Contains(i;",");@Left(@RightBack(i;",");"?");"No");"Yes")


          No TIO for Formula so...



          enter image description here



          enter image description here



          enter image description here






          share|improve this answer









          $endgroup$






















            1














            $begingroup$


            Pyth, 25 bytes



            ?qeQ??},QPecQ,"No""Yes


            Try it online!



            ?q # if ==
            eQ? # Q[-1] "?":
            ?} # if in
            ,Q # "," Q:
            cQ, # return split(Q, ",")
            e # [-1] (last element)
            P # [:-1] (remove the trailing ?)
            "No" # else: return "No"
            "Yes" # else: return "Yes" (last " implicit)





            share|improve this answer











            $endgroup$






















              1














              $begingroup$


              Gema, 34 characters



              *,*?=@subst*,=;$2
              *?=No
              *=Yes


              Sample run:



              bash-5.0$ echo -n 'Hey,does this program work?' | gema '*,*?=@subst*,=;$2;*?=No;*=Yes'
              does this program work


              Try it online! / Try all test cases online!






              share|improve this answer











              $endgroup$






















                1














                $begingroup$


                Python 2, 66 63 bytes





                lambda i:("Yes",("No",i.split(",")[-1][:-1])[","in i])["?"in i]


                Try it online!



                -3 after spotting the updated clarification "the input will only have one ? and it will always be the last character."



                Basically a port of my Lotus Notes answer. Curiously, the clarification noted above does not help the Notes answer because @Ends is 4 bytes cheaper than @Contains. Now if only there was an @In function...






                share|improve this answer











                $endgroup$






















                  0














                  $begingroup$


                  Zsh, 51 bytes



                  <<<$$$1#*?:+Yes:-$$$$1##*,%$1:-No%?


                  Try it online!



                  A byte can be saved if ends with,? and similar are invalid.






                  share|improve this answer









                  $endgroup$






















                    0














                    $begingroup$


                    Japt, 23 bytes



                    ø'? ?Uq, hoinu¹Ìk'?:`Y


                    Try it






                    share|improve this answer









                    $endgroup$






















                      0














                      $begingroup$


                      C++ (gcc), 120 bytes



                      Function-like macro:





                      #include<string>
                      #define f(s)(int i,j;for(;s[i];)j=s[++i]-44?j:i;s[--i]-63?"Yes":j?std::string(s+j+1,i-j-1):"No";)


                      Try it online!






                      share|improve this answer









                      $endgroup$






















                        0














                        $begingroup$


                        Stax, 16 bytes



                        ëw‼◘╔╤▬n→ª▒¡Γ╟ï¿


                        Run and debug it






                        share|improve this answer









                        $endgroup$

















                          Your Answer






                          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/4.0/"u003ecc by-sa 4.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
                          );



                          );














                          draft saved

                          draft discarded
















                          StackExchange.ready(
                          function ()
                          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodegolf.stackexchange.com%2fquestions%2f192900%2finquiry-answerer%23new-answer', 'question_page');

                          );

                          Post as a guest















                          Required, but never shown

























                          17 Answers
                          17






                          active

                          oldest

                          votes








                          17 Answers
                          17






                          active

                          oldest

                          votes









                          active

                          oldest

                          votes






                          active

                          oldest

                          votes









                          4














                          $begingroup$


                          Python 3, 62 bytes





                          lambda s:['Yes',*s[:-1].split(','),'No'][~(','in s)*('?'in s)]


                          Try it online!



                          The expression ~(','in s)*('?'in s) evaluates to 0 (i.e. 'Yes') if the string does not contain a '?', else -1 (i.e. 'No') if the string does not contain a ',', and otherwise -2 (i.e. the last comma-separated section of the string excluding the last character).






                          share|improve this answer











                          $endgroup$



















                            4














                            $begingroup$


                            Python 3, 62 bytes





                            lambda s:['Yes',*s[:-1].split(','),'No'][~(','in s)*('?'in s)]


                            Try it online!



                            The expression ~(','in s)*('?'in s) evaluates to 0 (i.e. 'Yes') if the string does not contain a '?', else -1 (i.e. 'No') if the string does not contain a ',', and otherwise -2 (i.e. the last comma-separated section of the string excluding the last character).






                            share|improve this answer











                            $endgroup$

















                              4














                              4










                              4







                              $begingroup$


                              Python 3, 62 bytes





                              lambda s:['Yes',*s[:-1].split(','),'No'][~(','in s)*('?'in s)]


                              Try it online!



                              The expression ~(','in s)*('?'in s) evaluates to 0 (i.e. 'Yes') if the string does not contain a '?', else -1 (i.e. 'No') if the string does not contain a ',', and otherwise -2 (i.e. the last comma-separated section of the string excluding the last character).






                              share|improve this answer











                              $endgroup$




                              Python 3, 62 bytes





                              lambda s:['Yes',*s[:-1].split(','),'No'][~(','in s)*('?'in s)]


                              Try it online!



                              The expression ~(','in s)*('?'in s) evaluates to 0 (i.e. 'Yes') if the string does not contain a '?', else -1 (i.e. 'No') if the string does not contain a ',', and otherwise -2 (i.e. the last comma-separated section of the string excluding the last character).







                              share|improve this answer














                              share|improve this answer



                              share|improve this answer








                              edited 5 hours ago

























                              answered 8 hours ago









                              JitseJitse

                              1,7967 silver badges24 bronze badges




                              1,7967 silver badges24 bronze badges


























                                  4














                                  $begingroup$


                                  05AB1E, 20 19 bytes



                                  '?åi',¡”€–”0ǝθ¨ë”…Ü


                                  -1 byte thanks to @Grimy.



                                  Try it online or verify all test cases.



                                  Explanation:





                                  '?åi '# If the (implicit) input contains a "?":
                                  ',¡ '# Split the (implicit) input on ","
                                  ”€–” # Push dictionary string "Not"
                                  0ǝ # Insert it at the first position (index 0) in the list
                                  θ # Then get the last item of the list
                                  ¨ # And remove the last character
                                  # (either the "?" of the original input; or the "t" in "Not")
                                  ë # Else:
                                  ”…Ü # Push dictionary string "Yes"
                                  # (after which the top of the stack is output implicitly as result)


                                  See this 05AB1E tip of mine (section How to use the dictionary?) to understand why ”€–” is "Not" and ”…Ü is "Yes".






                                  share|improve this answer











                                  $endgroup$










                                  • 1




                                    $begingroup$
                                    20
                                    $endgroup$
                                    – Grimy
                                    6 hours ago










                                  • $begingroup$
                                    @Grimy Oh, smart thinking. Thanks! :)
                                    $endgroup$
                                    – Kevin Cruijssen
                                    6 hours ago















                                  4














                                  $begingroup$


                                  05AB1E, 20 19 bytes



                                  '?åi',¡”€–”0ǝθ¨ë”…Ü


                                  -1 byte thanks to @Grimy.



                                  Try it online or verify all test cases.



                                  Explanation:





                                  '?åi '# If the (implicit) input contains a "?":
                                  ',¡ '# Split the (implicit) input on ","
                                  ”€–” # Push dictionary string "Not"
                                  0ǝ # Insert it at the first position (index 0) in the list
                                  θ # Then get the last item of the list
                                  ¨ # And remove the last character
                                  # (either the "?" of the original input; or the "t" in "Not")
                                  ë # Else:
                                  ”…Ü # Push dictionary string "Yes"
                                  # (after which the top of the stack is output implicitly as result)


                                  See this 05AB1E tip of mine (section How to use the dictionary?) to understand why ”€–” is "Not" and ”…Ü is "Yes".






                                  share|improve this answer











                                  $endgroup$










                                  • 1




                                    $begingroup$
                                    20
                                    $endgroup$
                                    – Grimy
                                    6 hours ago










                                  • $begingroup$
                                    @Grimy Oh, smart thinking. Thanks! :)
                                    $endgroup$
                                    – Kevin Cruijssen
                                    6 hours ago













                                  4














                                  4










                                  4







                                  $begingroup$


                                  05AB1E, 20 19 bytes



                                  '?åi',¡”€–”0ǝθ¨ë”…Ü


                                  -1 byte thanks to @Grimy.



                                  Try it online or verify all test cases.



                                  Explanation:





                                  '?åi '# If the (implicit) input contains a "?":
                                  ',¡ '# Split the (implicit) input on ","
                                  ”€–” # Push dictionary string "Not"
                                  0ǝ # Insert it at the first position (index 0) in the list
                                  θ # Then get the last item of the list
                                  ¨ # And remove the last character
                                  # (either the "?" of the original input; or the "t" in "Not")
                                  ë # Else:
                                  ”…Ü # Push dictionary string "Yes"
                                  # (after which the top of the stack is output implicitly as result)


                                  See this 05AB1E tip of mine (section How to use the dictionary?) to understand why ”€–” is "Not" and ”…Ü is "Yes".






                                  share|improve this answer











                                  $endgroup$




                                  05AB1E, 20 19 bytes



                                  '?åi',¡”€–”0ǝθ¨ë”…Ü


                                  -1 byte thanks to @Grimy.



                                  Try it online or verify all test cases.



                                  Explanation:





                                  '?åi '# If the (implicit) input contains a "?":
                                  ',¡ '# Split the (implicit) input on ","
                                  ”€–” # Push dictionary string "Not"
                                  0ǝ # Insert it at the first position (index 0) in the list
                                  θ # Then get the last item of the list
                                  ¨ # And remove the last character
                                  # (either the "?" of the original input; or the "t" in "Not")
                                  ë # Else:
                                  ”…Ü # Push dictionary string "Yes"
                                  # (after which the top of the stack is output implicitly as result)


                                  See this 05AB1E tip of mine (section How to use the dictionary?) to understand why ”€–” is "Not" and ”…Ü is "Yes".







                                  share|improve this answer














                                  share|improve this answer



                                  share|improve this answer








                                  edited 4 hours ago

























                                  answered 8 hours ago









                                  Kevin CruijssenKevin Cruijssen

                                  51k7 gold badges85 silver badges247 bronze badges




                                  51k7 gold badges85 silver badges247 bronze badges










                                  • 1




                                    $begingroup$
                                    20
                                    $endgroup$
                                    – Grimy
                                    6 hours ago










                                  • $begingroup$
                                    @Grimy Oh, smart thinking. Thanks! :)
                                    $endgroup$
                                    – Kevin Cruijssen
                                    6 hours ago












                                  • 1




                                    $begingroup$
                                    20
                                    $endgroup$
                                    – Grimy
                                    6 hours ago










                                  • $begingroup$
                                    @Grimy Oh, smart thinking. Thanks! :)
                                    $endgroup$
                                    – Kevin Cruijssen
                                    6 hours ago







                                  1




                                  1




                                  $begingroup$
                                  20
                                  $endgroup$
                                  – Grimy
                                  6 hours ago




                                  $begingroup$
                                  20
                                  $endgroup$
                                  – Grimy
                                  6 hours ago












                                  $begingroup$
                                  @Grimy Oh, smart thinking. Thanks! :)
                                  $endgroup$
                                  – Kevin Cruijssen
                                  6 hours ago




                                  $begingroup$
                                  @Grimy Oh, smart thinking. Thanks! :)
                                  $endgroup$
                                  – Kevin Cruijssen
                                  6 hours ago











                                  4














                                  $begingroup$

                                  JavaScript (ES6),  53  52 bytes





                                  s=>(m=s.match(/(,?)([^,]*)?/))?m[1]?m[2]:'No':'Yes'


                                  Try it online!



                                  Commented



                                  s => // s = input string
                                  ( m = s.match( // m is the result of matching in s:
                                  // +------------> an optional comma
                                  // | +------> followed by a string containing no comma
                                  // | | +--> followed by a question mark
                                  // <--><-----><>
                                  /(,?)([^,]*)?/
                                  )) ? // if m is not null:
                                  m[1] ? // if the comma exists:
                                  m[2] // output the string following it
                                  : // else:
                                  'No' // output 'No'
                                  : // else:
                                  'Yes' // output 'Yes'





                                  share|improve this answer











                                  $endgroup$














                                  • $begingroup$
                                    Welp, was looking for a JS solution, ended up with something double this size.
                                    $endgroup$
                                    – The random guy
                                    8 hours ago















                                  4














                                  $begingroup$

                                  JavaScript (ES6),  53  52 bytes





                                  s=>(m=s.match(/(,?)([^,]*)?/))?m[1]?m[2]:'No':'Yes'


                                  Try it online!



                                  Commented



                                  s => // s = input string
                                  ( m = s.match( // m is the result of matching in s:
                                  // +------------> an optional comma
                                  // | +------> followed by a string containing no comma
                                  // | | +--> followed by a question mark
                                  // <--><-----><>
                                  /(,?)([^,]*)?/
                                  )) ? // if m is not null:
                                  m[1] ? // if the comma exists:
                                  m[2] // output the string following it
                                  : // else:
                                  'No' // output 'No'
                                  : // else:
                                  'Yes' // output 'Yes'





                                  share|improve this answer











                                  $endgroup$














                                  • $begingroup$
                                    Welp, was looking for a JS solution, ended up with something double this size.
                                    $endgroup$
                                    – The random guy
                                    8 hours ago













                                  4














                                  4










                                  4







                                  $begingroup$

                                  JavaScript (ES6),  53  52 bytes





                                  s=>(m=s.match(/(,?)([^,]*)?/))?m[1]?m[2]:'No':'Yes'


                                  Try it online!



                                  Commented



                                  s => // s = input string
                                  ( m = s.match( // m is the result of matching in s:
                                  // +------------> an optional comma
                                  // | +------> followed by a string containing no comma
                                  // | | +--> followed by a question mark
                                  // <--><-----><>
                                  /(,?)([^,]*)?/
                                  )) ? // if m is not null:
                                  m[1] ? // if the comma exists:
                                  m[2] // output the string following it
                                  : // else:
                                  'No' // output 'No'
                                  : // else:
                                  'Yes' // output 'Yes'





                                  share|improve this answer











                                  $endgroup$



                                  JavaScript (ES6),  53  52 bytes





                                  s=>(m=s.match(/(,?)([^,]*)?/))?m[1]?m[2]:'No':'Yes'


                                  Try it online!



                                  Commented



                                  s => // s = input string
                                  ( m = s.match( // m is the result of matching in s:
                                  // +------------> an optional comma
                                  // | +------> followed by a string containing no comma
                                  // | | +--> followed by a question mark
                                  // <--><-----><>
                                  /(,?)([^,]*)?/
                                  )) ? // if m is not null:
                                  m[1] ? // if the comma exists:
                                  m[2] // output the string following it
                                  : // else:
                                  'No' // output 'No'
                                  : // else:
                                  'Yes' // output 'Yes'






                                  share|improve this answer














                                  share|improve this answer



                                  share|improve this answer








                                  edited 2 hours ago

























                                  answered 8 hours ago









                                  ArnauldArnauld

                                  92.7k7 gold badges108 silver badges377 bronze badges




                                  92.7k7 gold badges108 silver badges377 bronze badges














                                  • $begingroup$
                                    Welp, was looking for a JS solution, ended up with something double this size.
                                    $endgroup$
                                    – The random guy
                                    8 hours ago
















                                  • $begingroup$
                                    Welp, was looking for a JS solution, ended up with something double this size.
                                    $endgroup$
                                    – The random guy
                                    8 hours ago















                                  $begingroup$
                                  Welp, was looking for a JS solution, ended up with something double this size.
                                  $endgroup$
                                  – The random guy
                                  8 hours ago




                                  $begingroup$
                                  Welp, was looking for a JS solution, ended up with something double this size.
                                  $endgroup$
                                  – The random guy
                                  8 hours ago











                                  3














                                  $begingroup$


                                  Charcoal, 23 22 bytes



                                  ¿№θ?¿№θ,⁻⊟⪪θ,¦?¦No¦Yes


                                  Try it online! Link is to verbose version of code. Edit: Saved 1 byte thanks to @KevinCruijssen. Explanation:



                                  ¿№θ?


                                  Does the string contain any ?s?



                                  ¿№θ,


                                  Does it contain any ,s?



                                  ⊟⪪θ,


                                  Split the string on ,s and take the last.



                                  ⁻...?


                                  Delete the ? and output the result.



                                  No


                                  If there are no ,s then output No.



                                  Yes


                                  If there are no ?s then output Yes.






                                  share|improve this answer











                                  $endgroup$














                                  • $begingroup$
                                    -1 changing Print(Join(Split(Pop(Split(q, ",")), "?"), w) to Print(Minus(Pop(Split(q, ",")), "?");
                                    $endgroup$
                                    – Kevin Cruijssen
                                    4 hours ago










                                  • $begingroup$
                                    @KevinCruijssen Thanks, I'd forgotten that Minus did that. Besides, I was feeling pleased with myself for saving two separators.
                                    $endgroup$
                                    – Neil
                                    1 hour ago















                                  3














                                  $begingroup$


                                  Charcoal, 23 22 bytes



                                  ¿№θ?¿№θ,⁻⊟⪪θ,¦?¦No¦Yes


                                  Try it online! Link is to verbose version of code. Edit: Saved 1 byte thanks to @KevinCruijssen. Explanation:



                                  ¿№θ?


                                  Does the string contain any ?s?



                                  ¿№θ,


                                  Does it contain any ,s?



                                  ⊟⪪θ,


                                  Split the string on ,s and take the last.



                                  ⁻...?


                                  Delete the ? and output the result.



                                  No


                                  If there are no ,s then output No.



                                  Yes


                                  If there are no ?s then output Yes.






                                  share|improve this answer











                                  $endgroup$














                                  • $begingroup$
                                    -1 changing Print(Join(Split(Pop(Split(q, ",")), "?"), w) to Print(Minus(Pop(Split(q, ",")), "?");
                                    $endgroup$
                                    – Kevin Cruijssen
                                    4 hours ago










                                  • $begingroup$
                                    @KevinCruijssen Thanks, I'd forgotten that Minus did that. Besides, I was feeling pleased with myself for saving two separators.
                                    $endgroup$
                                    – Neil
                                    1 hour ago













                                  3














                                  3










                                  3







                                  $begingroup$


                                  Charcoal, 23 22 bytes



                                  ¿№θ?¿№θ,⁻⊟⪪θ,¦?¦No¦Yes


                                  Try it online! Link is to verbose version of code. Edit: Saved 1 byte thanks to @KevinCruijssen. Explanation:



                                  ¿№θ?


                                  Does the string contain any ?s?



                                  ¿№θ,


                                  Does it contain any ,s?



                                  ⊟⪪θ,


                                  Split the string on ,s and take the last.



                                  ⁻...?


                                  Delete the ? and output the result.



                                  No


                                  If there are no ,s then output No.



                                  Yes


                                  If there are no ?s then output Yes.






                                  share|improve this answer











                                  $endgroup$




                                  Charcoal, 23 22 bytes



                                  ¿№θ?¿№θ,⁻⊟⪪θ,¦?¦No¦Yes


                                  Try it online! Link is to verbose version of code. Edit: Saved 1 byte thanks to @KevinCruijssen. Explanation:



                                  ¿№θ?


                                  Does the string contain any ?s?



                                  ¿№θ,


                                  Does it contain any ,s?



                                  ⊟⪪θ,


                                  Split the string on ,s and take the last.



                                  ⁻...?


                                  Delete the ? and output the result.



                                  No


                                  If there are no ,s then output No.



                                  Yes


                                  If there are no ?s then output Yes.







                                  share|improve this answer














                                  share|improve this answer



                                  share|improve this answer








                                  edited 1 hour ago

























                                  answered 5 hours ago









                                  NeilNeil

                                  88.9k8 gold badges46 silver badges188 bronze badges




                                  88.9k8 gold badges46 silver badges188 bronze badges














                                  • $begingroup$
                                    -1 changing Print(Join(Split(Pop(Split(q, ",")), "?"), w) to Print(Minus(Pop(Split(q, ",")), "?");
                                    $endgroup$
                                    – Kevin Cruijssen
                                    4 hours ago










                                  • $begingroup$
                                    @KevinCruijssen Thanks, I'd forgotten that Minus did that. Besides, I was feeling pleased with myself for saving two separators.
                                    $endgroup$
                                    – Neil
                                    1 hour ago
















                                  • $begingroup$
                                    -1 changing Print(Join(Split(Pop(Split(q, ",")), "?"), w) to Print(Minus(Pop(Split(q, ",")), "?");
                                    $endgroup$
                                    – Kevin Cruijssen
                                    4 hours ago










                                  • $begingroup$
                                    @KevinCruijssen Thanks, I'd forgotten that Minus did that. Besides, I was feeling pleased with myself for saving two separators.
                                    $endgroup$
                                    – Neil
                                    1 hour ago















                                  $begingroup$
                                  -1 changing Print(Join(Split(Pop(Split(q, ",")), "?"), w) to Print(Minus(Pop(Split(q, ",")), "?");
                                  $endgroup$
                                  – Kevin Cruijssen
                                  4 hours ago




                                  $begingroup$
                                  -1 changing Print(Join(Split(Pop(Split(q, ",")), "?"), w) to Print(Minus(Pop(Split(q, ",")), "?");
                                  $endgroup$
                                  – Kevin Cruijssen
                                  4 hours ago












                                  $begingroup$
                                  @KevinCruijssen Thanks, I'd forgotten that Minus did that. Besides, I was feeling pleased with myself for saving two separators.
                                  $endgroup$
                                  – Neil
                                  1 hour ago




                                  $begingroup$
                                  @KevinCruijssen Thanks, I'd forgotten that Minus did that. Besides, I was feeling pleased with myself for saving two separators.
                                  $endgroup$
                                  – Neil
                                  1 hour ago











                                  2














                                  $begingroup$


                                  Perl 5 + -plF/,|?/, 27 bytes





                                  $_=/?$/?/,/?$F[$#F]:No:Yes


                                  Try it online!






                                  share|improve this answer









                                  $endgroup$



















                                    2














                                    $begingroup$


                                    Perl 5 + -plF/,|?/, 27 bytes





                                    $_=/?$/?/,/?$F[$#F]:No:Yes


                                    Try it online!






                                    share|improve this answer









                                    $endgroup$

















                                      2














                                      2










                                      2







                                      $begingroup$


                                      Perl 5 + -plF/,|?/, 27 bytes





                                      $_=/?$/?/,/?$F[$#F]:No:Yes


                                      Try it online!






                                      share|improve this answer









                                      $endgroup$




                                      Perl 5 + -plF/,|?/, 27 bytes





                                      $_=/?$/?/,/?$F[$#F]:No:Yes


                                      Try it online!







                                      share|improve this answer












                                      share|improve this answer



                                      share|improve this answer










                                      answered 4 hours ago









                                      Dom HastingsDom Hastings

                                      15.1k3 gold badges34 silver badges71 bronze badges




                                      15.1k3 gold badges34 silver badges71 bronze badges
























                                          2














                                          $begingroup$


                                          Retina, 32 bytes



                                          .+[^?]$
                                          Yes
                                          .+,(.*)?
                                          $1
                                          .+?
                                          No


                                          Try it online.



                                          Explanation:



                                          Replace any input not ending with "?" with Yes:



                                          .+[^?]$
                                          Yes


                                          Replace any input containing a comma and ending with a "?" with the part between the comma and the "?" (captured in capture group 1):



                                          .+,(.*)?
                                          $1


                                          Replace any other input ending with a "?" with No:



                                          .+?
                                          No



                                          32 bytes alternative:



                                          ^/?/K`Yes
                                          .+,(.*)?
                                          $1
                                          /?/K`No


                                          K tip thanks to @Neil.



                                          Try it online.



                                          Explanation:



                                          The three steps are the same as above, but the K only looks at a partial match (? in this case). The ^ in the first line means a reverse, so if the input doesn't contain a ? it replaced it with Yes. And if the string does (still) contain a ? at the last line, it replaces it with No.






                                          share|improve this answer











                                          $endgroup$














                                          • $begingroup$
                                            Did you know that Retina 1's K stage has a built-in conditional? I didn't. It could probably save you a few bytes.
                                            $endgroup$
                                            – Neil
                                            4 hours ago










                                          • $begingroup$
                                            @Neil I'm not sure how to chain the K and conditional & to be completely honest. I know how to use K with a regex to match like this, but how do I combine it with the conditional to mimic a ternary if-else for the Yes/No?
                                            $endgroup$
                                            – Kevin Cruijssen
                                            3 hours ago










                                          • $begingroup$
                                            You don't need &, which is what surprised me, and you can just match on a string, or better still, a character, since you know that any ? must be at the end.
                                            $endgroup$
                                            – Neil
                                            1 hour ago










                                          • $begingroup$
                                            @Neil So, like this? Which is also 32 bytes apparently.
                                            $endgroup$
                                            – Kevin Cruijssen
                                            59 mins ago















                                          2














                                          $begingroup$


                                          Retina, 32 bytes



                                          .+[^?]$
                                          Yes
                                          .+,(.*)?
                                          $1
                                          .+?
                                          No


                                          Try it online.



                                          Explanation:



                                          Replace any input not ending with "?" with Yes:



                                          .+[^?]$
                                          Yes


                                          Replace any input containing a comma and ending with a "?" with the part between the comma and the "?" (captured in capture group 1):



                                          .+,(.*)?
                                          $1


                                          Replace any other input ending with a "?" with No:



                                          .+?
                                          No



                                          32 bytes alternative:



                                          ^/?/K`Yes
                                          .+,(.*)?
                                          $1
                                          /?/K`No


                                          K tip thanks to @Neil.



                                          Try it online.



                                          Explanation:



                                          The three steps are the same as above, but the K only looks at a partial match (? in this case). The ^ in the first line means a reverse, so if the input doesn't contain a ? it replaced it with Yes. And if the string does (still) contain a ? at the last line, it replaces it with No.






                                          share|improve this answer











                                          $endgroup$














                                          • $begingroup$
                                            Did you know that Retina 1's K stage has a built-in conditional? I didn't. It could probably save you a few bytes.
                                            $endgroup$
                                            – Neil
                                            4 hours ago










                                          • $begingroup$
                                            @Neil I'm not sure how to chain the K and conditional & to be completely honest. I know how to use K with a regex to match like this, but how do I combine it with the conditional to mimic a ternary if-else for the Yes/No?
                                            $endgroup$
                                            – Kevin Cruijssen
                                            3 hours ago










                                          • $begingroup$
                                            You don't need &, which is what surprised me, and you can just match on a string, or better still, a character, since you know that any ? must be at the end.
                                            $endgroup$
                                            – Neil
                                            1 hour ago










                                          • $begingroup$
                                            @Neil So, like this? Which is also 32 bytes apparently.
                                            $endgroup$
                                            – Kevin Cruijssen
                                            59 mins ago













                                          2














                                          2










                                          2







                                          $begingroup$


                                          Retina, 32 bytes



                                          .+[^?]$
                                          Yes
                                          .+,(.*)?
                                          $1
                                          .+?
                                          No


                                          Try it online.



                                          Explanation:



                                          Replace any input not ending with "?" with Yes:



                                          .+[^?]$
                                          Yes


                                          Replace any input containing a comma and ending with a "?" with the part between the comma and the "?" (captured in capture group 1):



                                          .+,(.*)?
                                          $1


                                          Replace any other input ending with a "?" with No:



                                          .+?
                                          No



                                          32 bytes alternative:



                                          ^/?/K`Yes
                                          .+,(.*)?
                                          $1
                                          /?/K`No


                                          K tip thanks to @Neil.



                                          Try it online.



                                          Explanation:



                                          The three steps are the same as above, but the K only looks at a partial match (? in this case). The ^ in the first line means a reverse, so if the input doesn't contain a ? it replaced it with Yes. And if the string does (still) contain a ? at the last line, it replaces it with No.






                                          share|improve this answer











                                          $endgroup$




                                          Retina, 32 bytes



                                          .+[^?]$
                                          Yes
                                          .+,(.*)?
                                          $1
                                          .+?
                                          No


                                          Try it online.



                                          Explanation:



                                          Replace any input not ending with "?" with Yes:



                                          .+[^?]$
                                          Yes


                                          Replace any input containing a comma and ending with a "?" with the part between the comma and the "?" (captured in capture group 1):



                                          .+,(.*)?
                                          $1


                                          Replace any other input ending with a "?" with No:



                                          .+?
                                          No



                                          32 bytes alternative:



                                          ^/?/K`Yes
                                          .+,(.*)?
                                          $1
                                          /?/K`No


                                          K tip thanks to @Neil.



                                          Try it online.



                                          Explanation:



                                          The three steps are the same as above, but the K only looks at a partial match (? in this case). The ^ in the first line means a reverse, so if the input doesn't contain a ? it replaced it with Yes. And if the string does (still) contain a ? at the last line, it replaces it with No.







                                          share|improve this answer














                                          share|improve this answer



                                          share|improve this answer








                                          edited 56 mins ago

























                                          answered 5 hours ago









                                          Kevin CruijssenKevin Cruijssen

                                          51k7 gold badges85 silver badges247 bronze badges




                                          51k7 gold badges85 silver badges247 bronze badges














                                          • $begingroup$
                                            Did you know that Retina 1's K stage has a built-in conditional? I didn't. It could probably save you a few bytes.
                                            $endgroup$
                                            – Neil
                                            4 hours ago










                                          • $begingroup$
                                            @Neil I'm not sure how to chain the K and conditional & to be completely honest. I know how to use K with a regex to match like this, but how do I combine it with the conditional to mimic a ternary if-else for the Yes/No?
                                            $endgroup$
                                            – Kevin Cruijssen
                                            3 hours ago










                                          • $begingroup$
                                            You don't need &, which is what surprised me, and you can just match on a string, or better still, a character, since you know that any ? must be at the end.
                                            $endgroup$
                                            – Neil
                                            1 hour ago










                                          • $begingroup$
                                            @Neil So, like this? Which is also 32 bytes apparently.
                                            $endgroup$
                                            – Kevin Cruijssen
                                            59 mins ago
















                                          • $begingroup$
                                            Did you know that Retina 1's K stage has a built-in conditional? I didn't. It could probably save you a few bytes.
                                            $endgroup$
                                            – Neil
                                            4 hours ago










                                          • $begingroup$
                                            @Neil I'm not sure how to chain the K and conditional & to be completely honest. I know how to use K with a regex to match like this, but how do I combine it with the conditional to mimic a ternary if-else for the Yes/No?
                                            $endgroup$
                                            – Kevin Cruijssen
                                            3 hours ago










                                          • $begingroup$
                                            You don't need &, which is what surprised me, and you can just match on a string, or better still, a character, since you know that any ? must be at the end.
                                            $endgroup$
                                            – Neil
                                            1 hour ago










                                          • $begingroup$
                                            @Neil So, like this? Which is also 32 bytes apparently.
                                            $endgroup$
                                            – Kevin Cruijssen
                                            59 mins ago















                                          $begingroup$
                                          Did you know that Retina 1's K stage has a built-in conditional? I didn't. It could probably save you a few bytes.
                                          $endgroup$
                                          – Neil
                                          4 hours ago




                                          $begingroup$
                                          Did you know that Retina 1's K stage has a built-in conditional? I didn't. It could probably save you a few bytes.
                                          $endgroup$
                                          – Neil
                                          4 hours ago












                                          $begingroup$
                                          @Neil I'm not sure how to chain the K and conditional & to be completely honest. I know how to use K with a regex to match like this, but how do I combine it with the conditional to mimic a ternary if-else for the Yes/No?
                                          $endgroup$
                                          – Kevin Cruijssen
                                          3 hours ago




                                          $begingroup$
                                          @Neil I'm not sure how to chain the K and conditional & to be completely honest. I know how to use K with a regex to match like this, but how do I combine it with the conditional to mimic a ternary if-else for the Yes/No?
                                          $endgroup$
                                          – Kevin Cruijssen
                                          3 hours ago












                                          $begingroup$
                                          You don't need &, which is what surprised me, and you can just match on a string, or better still, a character, since you know that any ? must be at the end.
                                          $endgroup$
                                          – Neil
                                          1 hour ago




                                          $begingroup$
                                          You don't need &, which is what surprised me, and you can just match on a string, or better still, a character, since you know that any ? must be at the end.
                                          $endgroup$
                                          – Neil
                                          1 hour ago












                                          $begingroup$
                                          @Neil So, like this? Which is also 32 bytes apparently.
                                          $endgroup$
                                          – Kevin Cruijssen
                                          59 mins ago




                                          $begingroup$
                                          @Neil So, like this? Which is also 32 bytes apparently.
                                          $endgroup$
                                          – Kevin Cruijssen
                                          59 mins ago











                                          1














                                          $begingroup$


                                          PHP, 58 bytes





                                          <?=$argn[-1]=='?'?substr(strrchr($argn,','),1,-1)?:No:Yes;


                                          Try it online!






                                          share|improve this answer











                                          $endgroup$














                                          • $begingroup$
                                            Prints No instead of the empty string in cases ending with ,?.
                                            $endgroup$
                                            – GammaFunction
                                            1 hour ago















                                          1














                                          $begingroup$


                                          PHP, 58 bytes





                                          <?=$argn[-1]=='?'?substr(strrchr($argn,','),1,-1)?:No:Yes;


                                          Try it online!






                                          share|improve this answer











                                          $endgroup$














                                          • $begingroup$
                                            Prints No instead of the empty string in cases ending with ,?.
                                            $endgroup$
                                            – GammaFunction
                                            1 hour ago













                                          1














                                          1










                                          1







                                          $begingroup$


                                          PHP, 58 bytes





                                          <?=$argn[-1]=='?'?substr(strrchr($argn,','),1,-1)?:No:Yes;


                                          Try it online!






                                          share|improve this answer











                                          $endgroup$




                                          PHP, 58 bytes





                                          <?=$argn[-1]=='?'?substr(strrchr($argn,','),1,-1)?:No:Yes;


                                          Try it online!







                                          share|improve this answer














                                          share|improve this answer



                                          share|improve this answer








                                          edited 6 hours ago

























                                          answered 7 hours ago









                                          Night2Night2

                                          2,7313 silver badges17 bronze badges




                                          2,7313 silver badges17 bronze badges














                                          • $begingroup$
                                            Prints No instead of the empty string in cases ending with ,?.
                                            $endgroup$
                                            – GammaFunction
                                            1 hour ago
















                                          • $begingroup$
                                            Prints No instead of the empty string in cases ending with ,?.
                                            $endgroup$
                                            – GammaFunction
                                            1 hour ago















                                          $begingroup$
                                          Prints No instead of the empty string in cases ending with ,?.
                                          $endgroup$
                                          – GammaFunction
                                          1 hour ago




                                          $begingroup$
                                          Prints No instead of the empty string in cases ending with ,?.
                                          $endgroup$
                                          – GammaFunction
                                          1 hour ago











                                          1














                                          $begingroup$


                                          Red, 78 bytes



                                          func[s][r:"Yes"parse s[to","copy t to"?"(r: last split t",")| to"?"(r:"No")]r]


                                          Try it online!






                                          share|improve this answer









                                          $endgroup$



















                                            1














                                            $begingroup$


                                            Red, 78 bytes



                                            func[s][r:"Yes"parse s[to","copy t to"?"(r: last split t",")| to"?"(r:"No")]r]


                                            Try it online!






                                            share|improve this answer









                                            $endgroup$

















                                              1














                                              1










                                              1







                                              $begingroup$


                                              Red, 78 bytes



                                              func[s][r:"Yes"parse s[to","copy t to"?"(r: last split t",")| to"?"(r:"No")]r]


                                              Try it online!






                                              share|improve this answer









                                              $endgroup$




                                              Red, 78 bytes



                                              func[s][r:"Yes"parse s[to","copy t to"?"(r: last split t",")| to"?"(r:"No")]r]


                                              Try it online!







                                              share|improve this answer












                                              share|improve this answer



                                              share|improve this answer










                                              answered 6 hours ago









                                              Galen IvanovGalen Ivanov

                                              9,4471 gold badge14 silver badges39 bronze badges




                                              9,4471 gold badge14 silver badges39 bronze badges
























                                                  1














                                                  $begingroup$


                                                  Perl 6, 40 bytes








                                                  Try it online!






                                                  share|improve this answer









                                                  $endgroup$



















                                                    1














                                                    $begingroup$


                                                    Perl 6, 40 bytes








                                                    Try it online!






                                                    share|improve this answer









                                                    $endgroup$

















                                                      1














                                                      1










                                                      1







                                                      $begingroup$


                                                      Perl 6, 40 bytes








                                                      Try it online!






                                                      share|improve this answer









                                                      $endgroup$




                                                      Perl 6, 40 bytes








                                                      Try it online!







                                                      share|improve this answer












                                                      share|improve this answer



                                                      share|improve this answer










                                                      answered 6 hours ago









                                                      Jo KingJo King

                                                      31.2k4 gold badges72 silver badges139 bronze badges




                                                      31.2k4 gold badges72 silver badges139 bronze badges
























                                                          1














                                                          $begingroup$

                                                          IBM/Lotus Notes Formula, 79 bytes



                                                          @If(@Ends(i;"?");@If(@Contains(i;",");@Left(@RightBack(i;",");"?");"No");"Yes")


                                                          No TIO for Formula so...



                                                          enter image description here



                                                          enter image description here



                                                          enter image description here






                                                          share|improve this answer









                                                          $endgroup$



















                                                            1














                                                            $begingroup$

                                                            IBM/Lotus Notes Formula, 79 bytes



                                                            @If(@Ends(i;"?");@If(@Contains(i;",");@Left(@RightBack(i;",");"?");"No");"Yes")


                                                            No TIO for Formula so...



                                                            enter image description here



                                                            enter image description here



                                                            enter image description here






                                                            share|improve this answer









                                                            $endgroup$

















                                                              1














                                                              1










                                                              1







                                                              $begingroup$

                                                              IBM/Lotus Notes Formula, 79 bytes



                                                              @If(@Ends(i;"?");@If(@Contains(i;",");@Left(@RightBack(i;",");"?");"No");"Yes")


                                                              No TIO for Formula so...



                                                              enter image description here



                                                              enter image description here



                                                              enter image description here






                                                              share|improve this answer









                                                              $endgroup$



                                                              IBM/Lotus Notes Formula, 79 bytes



                                                              @If(@Ends(i;"?");@If(@Contains(i;",");@Left(@RightBack(i;",");"?");"No");"Yes")


                                                              No TIO for Formula so...



                                                              enter image description here



                                                              enter image description here



                                                              enter image description here







                                                              share|improve this answer












                                                              share|improve this answer



                                                              share|improve this answer










                                                              answered 5 hours ago









                                                              ElPedroElPedro

                                                              4,05813 silver badges28 bronze badges




                                                              4,05813 silver badges28 bronze badges
























                                                                  1














                                                                  $begingroup$


                                                                  Pyth, 25 bytes



                                                                  ?qeQ??},QPecQ,"No""Yes


                                                                  Try it online!



                                                                  ?q # if ==
                                                                  eQ? # Q[-1] "?":
                                                                  ?} # if in
                                                                  ,Q # "," Q:
                                                                  cQ, # return split(Q, ",")
                                                                  e # [-1] (last element)
                                                                  P # [:-1] (remove the trailing ?)
                                                                  "No" # else: return "No"
                                                                  "Yes" # else: return "Yes" (last " implicit)





                                                                  share|improve this answer











                                                                  $endgroup$



















                                                                    1














                                                                    $begingroup$


                                                                    Pyth, 25 bytes



                                                                    ?qeQ??},QPecQ,"No""Yes


                                                                    Try it online!



                                                                    ?q # if ==
                                                                    eQ? # Q[-1] "?":
                                                                    ?} # if in
                                                                    ,Q # "," Q:
                                                                    cQ, # return split(Q, ",")
                                                                    e # [-1] (last element)
                                                                    P # [:-1] (remove the trailing ?)
                                                                    "No" # else: return "No"
                                                                    "Yes" # else: return "Yes" (last " implicit)





                                                                    share|improve this answer











                                                                    $endgroup$

















                                                                      1














                                                                      1










                                                                      1







                                                                      $begingroup$


                                                                      Pyth, 25 bytes



                                                                      ?qeQ??},QPecQ,"No""Yes


                                                                      Try it online!



                                                                      ?q # if ==
                                                                      eQ? # Q[-1] "?":
                                                                      ?} # if in
                                                                      ,Q # "," Q:
                                                                      cQ, # return split(Q, ",")
                                                                      e # [-1] (last element)
                                                                      P # [:-1] (remove the trailing ?)
                                                                      "No" # else: return "No"
                                                                      "Yes" # else: return "Yes" (last " implicit)





                                                                      share|improve this answer











                                                                      $endgroup$




                                                                      Pyth, 25 bytes



                                                                      ?qeQ??},QPecQ,"No""Yes


                                                                      Try it online!



                                                                      ?q # if ==
                                                                      eQ? # Q[-1] "?":
                                                                      ?} # if in
                                                                      ,Q # "," Q:
                                                                      cQ, # return split(Q, ",")
                                                                      e # [-1] (last element)
                                                                      P # [:-1] (remove the trailing ?)
                                                                      "No" # else: return "No"
                                                                      "Yes" # else: return "Yes" (last " implicit)






                                                                      share|improve this answer














                                                                      share|improve this answer



                                                                      share|improve this answer








                                                                      edited 5 hours ago

























                                                                      answered 6 hours ago









                                                                      ar4093ar4093

                                                                      3816 bronze badges




                                                                      3816 bronze badges
























                                                                          1














                                                                          $begingroup$


                                                                          Gema, 34 characters



                                                                          *,*?=@subst*,=;$2
                                                                          *?=No
                                                                          *=Yes


                                                                          Sample run:



                                                                          bash-5.0$ echo -n 'Hey,does this program work?' | gema '*,*?=@subst*,=;$2;*?=No;*=Yes'
                                                                          does this program work


                                                                          Try it online! / Try all test cases online!






                                                                          share|improve this answer











                                                                          $endgroup$



















                                                                            1














                                                                            $begingroup$


                                                                            Gema, 34 characters



                                                                            *,*?=@subst*,=;$2
                                                                            *?=No
                                                                            *=Yes


                                                                            Sample run:



                                                                            bash-5.0$ echo -n 'Hey,does this program work?' | gema '*,*?=@subst*,=;$2;*?=No;*=Yes'
                                                                            does this program work


                                                                            Try it online! / Try all test cases online!






                                                                            share|improve this answer











                                                                            $endgroup$

















                                                                              1














                                                                              1










                                                                              1







                                                                              $begingroup$


                                                                              Gema, 34 characters



                                                                              *,*?=@subst*,=;$2
                                                                              *?=No
                                                                              *=Yes


                                                                              Sample run:



                                                                              bash-5.0$ echo -n 'Hey,does this program work?' | gema '*,*?=@subst*,=;$2;*?=No;*=Yes'
                                                                              does this program work


                                                                              Try it online! / Try all test cases online!






                                                                              share|improve this answer











                                                                              $endgroup$




                                                                              Gema, 34 characters



                                                                              *,*?=@subst*,=;$2
                                                                              *?=No
                                                                              *=Yes


                                                                              Sample run:



                                                                              bash-5.0$ echo -n 'Hey,does this program work?' | gema '*,*?=@subst*,=;$2;*?=No;*=Yes'
                                                                              does this program work


                                                                              Try it online! / Try all test cases online!







                                                                              share|improve this answer














                                                                              share|improve this answer



                                                                              share|improve this answer








                                                                              edited 4 hours ago

























                                                                              answered 7 hours ago









                                                                              manatworkmanatwork

                                                                              16.8k4 gold badges39 silver badges73 bronze badges




                                                                              16.8k4 gold badges39 silver badges73 bronze badges
























                                                                                  1














                                                                                  $begingroup$


                                                                                  Python 2, 66 63 bytes





                                                                                  lambda i:("Yes",("No",i.split(",")[-1][:-1])[","in i])["?"in i]


                                                                                  Try it online!



                                                                                  -3 after spotting the updated clarification "the input will only have one ? and it will always be the last character."



                                                                                  Basically a port of my Lotus Notes answer. Curiously, the clarification noted above does not help the Notes answer because @Ends is 4 bytes cheaper than @Contains. Now if only there was an @In function...






                                                                                  share|improve this answer











                                                                                  $endgroup$



















                                                                                    1














                                                                                    $begingroup$


                                                                                    Python 2, 66 63 bytes





                                                                                    lambda i:("Yes",("No",i.split(",")[-1][:-1])[","in i])["?"in i]


                                                                                    Try it online!



                                                                                    -3 after spotting the updated clarification "the input will only have one ? and it will always be the last character."



                                                                                    Basically a port of my Lotus Notes answer. Curiously, the clarification noted above does not help the Notes answer because @Ends is 4 bytes cheaper than @Contains. Now if only there was an @In function...






                                                                                    share|improve this answer











                                                                                    $endgroup$

















                                                                                      1














                                                                                      1










                                                                                      1







                                                                                      $begingroup$


                                                                                      Python 2, 66 63 bytes





                                                                                      lambda i:("Yes",("No",i.split(",")[-1][:-1])[","in i])["?"in i]


                                                                                      Try it online!



                                                                                      -3 after spotting the updated clarification "the input will only have one ? and it will always be the last character."



                                                                                      Basically a port of my Lotus Notes answer. Curiously, the clarification noted above does not help the Notes answer because @Ends is 4 bytes cheaper than @Contains. Now if only there was an @In function...






                                                                                      share|improve this answer











                                                                                      $endgroup$




                                                                                      Python 2, 66 63 bytes





                                                                                      lambda i:("Yes",("No",i.split(",")[-1][:-1])[","in i])["?"in i]


                                                                                      Try it online!



                                                                                      -3 after spotting the updated clarification "the input will only have one ? and it will always be the last character."



                                                                                      Basically a port of my Lotus Notes answer. Curiously, the clarification noted above does not help the Notes answer because @Ends is 4 bytes cheaper than @Contains. Now if only there was an @In function...







                                                                                      share|improve this answer














                                                                                      share|improve this answer



                                                                                      share|improve this answer








                                                                                      edited 2 hours ago

























                                                                                      answered 4 hours ago









                                                                                      ElPedroElPedro

                                                                                      4,05813 silver badges28 bronze badges




                                                                                      4,05813 silver badges28 bronze badges
























                                                                                          0














                                                                                          $begingroup$


                                                                                          Zsh, 51 bytes



                                                                                          <<<$$$1#*?:+Yes:-$$$$1##*,%$1:-No%?


                                                                                          Try it online!



                                                                                          A byte can be saved if ends with,? and similar are invalid.






                                                                                          share|improve this answer









                                                                                          $endgroup$



















                                                                                            0














                                                                                            $begingroup$


                                                                                            Zsh, 51 bytes



                                                                                            <<<$$$1#*?:+Yes:-$$$$1##*,%$1:-No%?


                                                                                            Try it online!



                                                                                            A byte can be saved if ends with,? and similar are invalid.






                                                                                            share|improve this answer









                                                                                            $endgroup$

















                                                                                              0














                                                                                              0










                                                                                              0







                                                                                              $begingroup$


                                                                                              Zsh, 51 bytes



                                                                                              <<<$$$1#*?:+Yes:-$$$$1##*,%$1:-No%?


                                                                                              Try it online!



                                                                                              A byte can be saved if ends with,? and similar are invalid.






                                                                                              share|improve this answer









                                                                                              $endgroup$




                                                                                              Zsh, 51 bytes



                                                                                              <<<$$$1#*?:+Yes:-$$$$1##*,%$1:-No%?


                                                                                              Try it online!



                                                                                              A byte can be saved if ends with,? and similar are invalid.







                                                                                              share|improve this answer












                                                                                              share|improve this answer



                                                                                              share|improve this answer










                                                                                              answered 1 hour ago









                                                                                              GammaFunctionGammaFunction

                                                                                              1,4953 silver badges15 bronze badges




                                                                                              1,4953 silver badges15 bronze badges
























                                                                                                  0














                                                                                                  $begingroup$


                                                                                                  Japt, 23 bytes



                                                                                                  ø'? ?Uq, hoinu¹Ìk'?:`Y


                                                                                                  Try it






                                                                                                  share|improve this answer









                                                                                                  $endgroup$



















                                                                                                    0














                                                                                                    $begingroup$


                                                                                                    Japt, 23 bytes



                                                                                                    ø'? ?Uq, hoinu¹Ìk'?:`Y


                                                                                                    Try it






                                                                                                    share|improve this answer









                                                                                                    $endgroup$

















                                                                                                      0














                                                                                                      0










                                                                                                      0







                                                                                                      $begingroup$


                                                                                                      Japt, 23 bytes



                                                                                                      ø'? ?Uq, hoinu¹Ìk'?:`Y


                                                                                                      Try it






                                                                                                      share|improve this answer









                                                                                                      $endgroup$




                                                                                                      Japt, 23 bytes



                                                                                                      ø'? ?Uq, hoinu¹Ìk'?:`Y


                                                                                                      Try it







                                                                                                      share|improve this answer












                                                                                                      share|improve this answer



                                                                                                      share|improve this answer










                                                                                                      answered 54 mins ago









                                                                                                      ShaggyShaggy

                                                                                                      21.5k3 gold badges21 silver badges72 bronze badges




                                                                                                      21.5k3 gold badges21 silver badges72 bronze badges
























                                                                                                          0














                                                                                                          $begingroup$


                                                                                                          C++ (gcc), 120 bytes



                                                                                                          Function-like macro:





                                                                                                          #include<string>
                                                                                                          #define f(s)(int i,j;for(;s[i];)j=s[++i]-44?j:i;s[--i]-63?"Yes":j?std::string(s+j+1,i-j-1):"No";)


                                                                                                          Try it online!






                                                                                                          share|improve this answer









                                                                                                          $endgroup$



















                                                                                                            0














                                                                                                            $begingroup$


                                                                                                            C++ (gcc), 120 bytes



                                                                                                            Function-like macro:





                                                                                                            #include<string>
                                                                                                            #define f(s)(int i,j;for(;s[i];)j=s[++i]-44?j:i;s[--i]-63?"Yes":j?std::string(s+j+1,i-j-1):"No";)


                                                                                                            Try it online!






                                                                                                            share|improve this answer









                                                                                                            $endgroup$

















                                                                                                              0














                                                                                                              0










                                                                                                              0







                                                                                                              $begingroup$


                                                                                                              C++ (gcc), 120 bytes



                                                                                                              Function-like macro:





                                                                                                              #include<string>
                                                                                                              #define f(s)(int i,j;for(;s[i];)j=s[++i]-44?j:i;s[--i]-63?"Yes":j?std::string(s+j+1,i-j-1):"No";)


                                                                                                              Try it online!






                                                                                                              share|improve this answer









                                                                                                              $endgroup$




                                                                                                              C++ (gcc), 120 bytes



                                                                                                              Function-like macro:





                                                                                                              #include<string>
                                                                                                              #define f(s)(int i,j;for(;s[i];)j=s[++i]-44?j:i;s[--i]-63?"Yes":j?std::string(s+j+1,i-j-1):"No";)


                                                                                                              Try it online!







                                                                                                              share|improve this answer












                                                                                                              share|improve this answer



                                                                                                              share|improve this answer










                                                                                                              answered 50 mins ago









                                                                                                              NishiokaNishioka

                                                                                                              1514 bronze badges




                                                                                                              1514 bronze badges
























                                                                                                                  0














                                                                                                                  $begingroup$


                                                                                                                  Stax, 16 bytes



                                                                                                                  ëw‼◘╔╤▬n→ª▒¡Γ╟ï¿


                                                                                                                  Run and debug it






                                                                                                                  share|improve this answer









                                                                                                                  $endgroup$



















                                                                                                                    0














                                                                                                                    $begingroup$


                                                                                                                    Stax, 16 bytes



                                                                                                                    ëw‼◘╔╤▬n→ª▒¡Γ╟ï¿


                                                                                                                    Run and debug it






                                                                                                                    share|improve this answer









                                                                                                                    $endgroup$

















                                                                                                                      0














                                                                                                                      0










                                                                                                                      0







                                                                                                                      $begingroup$


                                                                                                                      Stax, 16 bytes



                                                                                                                      ëw‼◘╔╤▬n→ª▒¡Γ╟ï¿


                                                                                                                      Run and debug it






                                                                                                                      share|improve this answer









                                                                                                                      $endgroup$




                                                                                                                      Stax, 16 bytes



                                                                                                                      ëw‼◘╔╤▬n→ª▒¡Γ╟ï¿


                                                                                                                      Run and debug it







                                                                                                                      share|improve this answer












                                                                                                                      share|improve this answer



                                                                                                                      share|improve this answer










                                                                                                                      answered 19 mins ago









                                                                                                                      recursiverecursive

                                                                                                                      8,28615 silver badges32 bronze badges




                                                                                                                      8,28615 silver badges32 bronze badges































                                                                                                                          draft saved

                                                                                                                          draft discarded















































                                                                                                                          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%2f192900%2finquiry-answerer%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

                                                                                                                          ParseJSON using SSJSUsing AMPscript with SSJS ActivitiesHow to resubscribe a user in Marketing cloud using SSJS?Pulling Subscriber Status from Lists using SSJSRetrieving Emails using SSJSProblem in updating DE using SSJSUsing SSJS to send single email in Marketing CloudError adding EmailSendDefinition using SSJS

                                                                                                                          Кампала Садржај Географија Географија Историја Становништво Привреда Партнерски градови Референце Спољашње везе Мени за навигацију0°11′ СГШ; 32°20′ ИГД / 0.18° СГШ; 32.34° ИГД / 0.18; 32.340°11′ СГШ; 32°20′ ИГД / 0.18° СГШ; 32.34° ИГД / 0.18; 32.34МедијиПодациЗванични веб-сајту

                                                                                                                          19. јануар Садржај Догађаји Рођења Смрти Празници и дани сећања Види још Референце Мени за навигацијуу