Using a loop, define a function anyRs(s) that yields true if string s contains the character 'R'. For example, anyRs("MyRabbit") = true, but anyRs("myrabbit") = false. Write Define ... %Define around the definition.

Be careful writing conditions. Do not try to compute s_k when k > length(s), since that will cause an error. Remember the short-circuiting property of the and and or operators.

 

    [Language: Cinnameg  Kind: program]