30
\$\begingroup\$

Your task is to create a program that prints "Greetings, Planet!" exactly to the console. Seems simple enough, right? Well, here's the trick. The code must be a palindrome, meaning it reads from right to left the same as in left to right. Standard loopholes are NOT allowed.

\$\endgroup\$
3
  • \$\begingroup\$ This does not seem to be "hello world". \$\endgroup\$ May 18 '16 at 13:43
  • 4
    \$\begingroup\$ @ΈρικΚωνσταντόπουλος It's the same as Hello World for all intents and purposes. The goal is to print a short string consisting of two words with the punctuation common in Hello World programs as well. Apart from built-ins that print Hello World, solutions will be absolutely identical (apart from the actual string) regardless of the actual string being printed. (And I assume the phrase "Greetings, Planet!" was chosen specifically to make built-ins useless.) \$\endgroup\$ May 18 '16 at 13:52
  • 1
    \$\begingroup\$ @MartinBüttner I think that Hello, world! and Hello World! are the only outputs allowed for a hello-world program. \$\endgroup\$ May 18 '16 at 14:09

63 Answers 63

1 2
3
0
\$\begingroup\$

Pip, 42 40 bytes

"!tenalP ,sgniteerG""Greetings, Planet!"

Try it online!

Pip prints the last expression in a file

\$\endgroup\$
0
\$\begingroup\$

Julia (1.2), 41 bytes

"!tenalP ,sgniteerG";"Greetings, Planet!"

Example

julia> print("!tenalP ,sgniteerG";"Greetings, Planet!")
"Greetings, Planet!"

Explanation

Putting a semicolon on the end of an expression makes the expression not output anything.

\$\endgroup\$
0
\$\begingroup\$

ink, 38 bytes

Greetings, Planet!//!tenalP ,sgniteerG

Try it online!

\$\endgroup\$
1 2
3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy