Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Fun activity Say hello... in a coding language!

Ok. Here is really hard way to do it lol.

XML:
<?xml version="1.0" encoding="UTF-8"?>
<message>
    <letter><title>H</title></letter>
    <letter><title>e</title></letter>
    <letter><title>l</title></letter>
    <letter><title>l</title></letter>
    <letter><title>o</title></letter>
    <letter><title>_</title></letter>
    <letter><title>W</title></letter>
    <letter><title>o</title></letter>
    <letter><title>r</title></letter>
    <letter><title>d</title></letter>
</message>

And then we need XSLT to read the XML data:
Code:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:output method="html" indent="yes"/>
 
  <xsl:template match="/">
    <html>
      <head>
        <title>Letters</title>
      </head>
      <body>
        <table>
          <tr>
            <xsl:apply-templates select="//letter"/>
          </tr>
        </table>
      </body>
    </html>
  </xsl:template>
 
  <xsl:template match="letter">
    <td>
      <xsl:value-of select="title"/>
    </td>
  </xsl:template>
 
</xsl:stylesheet>

And we end up in html.

HTML:
<html>
   <head>
      <title>Letters</title>
   </head>
   <body>
      <table>
         <tr>
            <td>H</td>
            <td>e</td>
            <td>l</td>
            <td>l</td>
            <td>o</td>
            <td>_</td>
            <td>W</td>
            <td>o</td>
            <td>r</td>
            <td>d</td>
         </tr>
      </table>
   </body>
</html>
 
Code:
package main
 
import "fmt"
 
// Main function
func main() {
 
    fmt.Println("Hello there, EkBass")
}

golang
 
C++:
#include <iostream>
int main(int argc, char** argv) {
    std::cout << “Hello vipulgupta”;
    return 0;
}
 
I love one-liners... and yes it does work.

Python:
lst = lambda *args: [
  arg if type(args[index]) == type(arg) else type(args[index])(arg) for index, arg in enumerate([
      chr(0).join([arg[int(chr(48))] for arg in [[str(arg)] for arg in args]])
    ][int(chr(48))].split(chr(0)))
]; print("".join(lst(chr(72), chr(101), chr(108), chr(108), chr(111), chr(44), chr(
    32), chr(67), chr(104), chr(97), chr(111), chr(116), chr(105), chr(99),
               chr(83), chr(97), chr(108), chr(109), chr(111), chr(110))))
 
I love one-liners... and yes it does work.

Python:
lst = lambda *args: [
  arg if type(args[index]) == type(arg) else type(args[index])(arg) for index, arg in enumerate([
      chr(0).join([arg[int(chr(48))] for arg in [[str(arg)] for arg in args]])
    ][int(chr(48))].split(chr(0)))
]; print("".join(lst(chr(72), chr(101), chr(108), chr(108), chr(111), chr(44), chr(
    32), chr(67), chr(104), chr(97), chr(111), chr(116), chr(105), chr(99),
               chr(83), chr(97), chr(108), chr(109), chr(111), chr(110))))
I hope this works! Lol. =).

Code:
HTML:

<p id="hello"></p>

Javascript:

let h = "Hello, skifli";
document.getElementById('hello').innerHTML = h;
 
PHP:
$letters = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z',' '];
$selection = [7,8,26,4,21,4,17,24,14,13,4];
$output = '';

foreach( $selection as $pick ) {
    $output .= $letters[$pick];
}

echo ucfirst($output);
 
Hello Coders!

Let's do something fun! This is supposed to be a fun way for us as a community to engage and learn from each other.

Okay, here's how it goes. You can decide what language you want to use, and all you have to say is "Hello, (person above)!" in the language that you picked ([UWSL][UWSL][UWSL]Using the BBCode function)[/UWSL][/UWSL][/UWSL].
So here's an example
C++:
std::cout << "Hello, Master Yoda";
"\0\s[5]i[9]Hello %(username)!\e"
 
C:
#include <stdio.h>

int main(void) {
    printf("Hello Sudo_coder12!\n"
           "Did you know?: there is a button you can press that allows you to format code!\n"
           "Pretty cool, eh? This makes it easier to post code for others to read!");

    return 0;
}
 
C:
#include <stdio.h>

int main(void) {
    printf("Hello Sudo_coder12!\n"
           "Did you know?: there is a button you can press that allows you to format code!\n"
           "Pretty cool, eh? This makes it easier to post code for others to read!");

    return 0;
}
Oh, I didn't knew about it !
could you please guide me, where would that be in this typing section ?
 
Last edited:
Oh, I didn't knew about it !
could you please guide me, where would that be in this typing section ?
You can create a code block by typing "code" in square brackets or an inline code block by typing "[INLINE]". If you have JavaScript enabled, if you look at the ribbon bar where your formatting options are, you'll see an icon with "</>" which allows you to insert code.[/CODE]

I recommend this thread here.
 

New Threads

Latest posts

Buy us a coffee!

Back
Top Bottom