Palindrom-prüfung für LOGO

Volleyballerin

Grünschnabel
Hallo.
Ich habe ein Problem.
Ich soll in der Schule eine Palindron-Prüfung für LOGO programmieren.
Bisher habe ich eine Eingabeprozedur,aber komme nicht so recht weiter.
Kann mir vielleicht jemand weiterhelfen?Das wäre sehr nett.
LG Melissa
 
Hallo,

schau mal hier:
Code:
print [Please enter a word:]
make "word readword
print (SENTENCE [You typed:] :word)
print (SENTENCE [The assertion that ] :word [ is a palindrom is ] equalp LOWERCASE :word reverse(LOWERCASE :word))

Ausgabe für Polynom:
Code:
Please enter a word:
Polynom
You typed: Polynom
The assertion that Polynom is a palindrom is false

Ausgabe für Reliefpfeiler:
Code:
Please enter a word:
Reliefpfeiler
You typed: Reliefpfeiler
The assertion that Reliefpfeiler is a palindrom is true

Gruß Tom
 
Zurück