Strings Problem Set 4

Part I - Raptor Programs

String.10 Without End 2

Given a string, output a version without both the first and last char of the string. The string may be any length, including 0.

Test Case

A Input

Program Output
1 Hello ell
2 abc b
3 ab  

Solutions:

python

raptor

String.11 Middle Two

Given a string of even length, output a string made of the middle two chars, so the string "string" yields "ri". The string length will be at least 2.

Test Case
A
Program Output
1 string ri
2 code od
3 practice ct

Solutions:

python

raptor

String.12 Ends "ly"

Given a string, output true if it ends in "ly".

Test Case
A
Program Output
1 Oddly true
2 oddy false
3 oddl false

Solutions:

python

raptor