good chemistry is complicated,and a little bit messy -LW PerlMonks

by jeffa (Bishop)
 on Mar 27, 2012 at 16:05 UTC ( #961973=note: print w/replies, xml ) Need Help??

Why don't you ask your teacher instead? This gives you a great opportunity to show you care about the class and it puts a face on your homework when it comes time to grade it.

jeffa

```L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
```

Replies are listed 'Best First'.
by Camerontainium (Initiate) on Mar 27, 2012 at 18:48 UTC

Thank you everyone but I did ask my teacher.

```if (\$a == \$i && \$b == \$h && \$c == \$g && \$d == \$f)    #Final configurat
+ion to tell if it is a palindrome
{
print "PALINDROME!";
}
else
{
print "NOT A PALINDROME!";
}
That was all i needed to do. I overthought the assignment.
```print "\nThis program asks for you to \n
enter any nine character sequence and \n
then tells you if it is a palidrome!\n\n";

Hmm, so the program asks for a character sequence, and you end up using numercal equasions. That will yield a whole lot of palidromes (and warnings if you did use warnings)

```say \$a eq \$i && \$b eq \$h && \$c eq \$g && \$d eq \$f ? "PALINDROME!" : "No
+t a PALINDROME!";

much simpler:

```\$user eq reverse \$user and say "You entered a PALINDROME!";

Enjoy, Have FUN! H.Merijn
... hummm...

I don't see the chop you originally said the teacher wanted you to use.

And are you sure the teacher didn't say chomp?

Create A New User
Node Status?
node history
Node Type: note [id://961973]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2018-04-21 00:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
Voting Booth?
My travels bear the most uncanny semblance to ...

Results (81 votes). Check out past polls.

Notices?