tasks a-s
This commit is contained in:
parent
47bf37c096
commit
b83f433714
12433 changed files with 156208 additions and 123 deletions
|
|
@ -0,0 +1,16 @@
|
|||
y='In girum imus nocte et consumimur igni'
|
||||
|
||||
-- translation: We walk around in the night and
|
||||
-- we are burnt by the fire (of love)
|
||||
say
|
||||
say 'string = 'y
|
||||
say
|
||||
|
||||
pal=isPal(y)
|
||||
|
||||
if pal==0 then say "The string isn't palindromic."
|
||||
else say 'The string is palindromic.'
|
||||
|
||||
method isPal(x) static
|
||||
x=x.upper().space(0) /* removes all blanks (spaces). */
|
||||
return x==x.reverse() /* returns 1 if exactly equal, */
|
||||
Loading…
Add table
Add a link
Reference in a new issue