Closed Thread
Page 21 of 22 FirstFirst ... 11 19 20 21 22 LastLast
Results 201 to 210 of 214

Thread: Day of the Programmer

  1. #201
    Recruit Porzana's Avatar
    Join Date
    Oct 2012
    Posts
    12
    World
    Ares
    It would give a compile error, because the variable used is not the one defined. But assuming everything worked, the word is "ornamentalsmith.
    Kill 'em all, let God sort them out.

  2. #202
    Recruit
    Join Date
    Apr 2014
    Posts
    1
    World
    Ares
    ornamentalsmith

  3. #203
    Recruit
    Join Date
    Mar 2012
    Posts
    3
    World
    Zeus
    ornamentalsmith

  4. #204
    Recruit
    Join Date
    Jul 2017
    Posts
    5
    World
    Ares
    Quote Originally Posted by BB_Odhran View Post
    Dear Settlers,

    Today is the day of the programmer. You always wondered how codes look like and how they even work?
    Well, you can try to solve the following Code even without being a programmer.


    • Give it a try and solve the Code. Give your answer in this thread.



    Code:
    // If you can read this code, tell your Community Manager the secret word and win a small prize.
    
    Var	Prize_Crystals
    Var	reverse = function(s) {
         return s.split (“”)reverse( ).join(“”);
    }
    Var	communitymanager = {
        Str1: “al”,
        Str2: reverse(“hti”)
        Str3: reverse(“tne”)
        Str4:reverse(“nro”)
        Str5: “am”,
        Str6:reverse(“ms”)
    
        request: function(preference) {
             return preference + “. Secret word: “
             +thisstr4+thisstr5+thisstr3+thisstr1+thisstr6+thisstr2;
        }
    };
    communitymanager.request (Prize_Crystal)
    Please note this is just a small "look" into a very complex theme. It is, in fact, not a "real" working code

    -BB_Odhran
    I don't know Javascript at all, but it appears that there is a problem with Var Prize_Crystals not being used and an undefined variable 'Prize_Crystal' being passed into the communitymanager.request function.
    (multiple or single case error?)

    The best I could come up with for the return value is .Secret word: ornamentalsmith

  5. #205
    Recruit Kepper's Avatar
    Join Date
    Aug 2012
    Location
    San Francisco, CA
    Posts
    15
    World
    Zeus
    ornamentalsmith

  6. #206
    Recruit
    Join Date
    Apr 2014
    Posts
    3
    World
    Ares
    is it ornamentalsmith??

  7. #207
    Recruit
    Join Date
    Jan 2018
    Posts
    2
    World
    Ares
    ornamentalsmith

  8. #208
    Recruit foton's Avatar
    Join Date
    Jul 2012
    Location
    Nova Scotia Canada
    Posts
    16
    World
    Zeus
    ornamentalsmith

  9. #209
    Recruit
    Join Date
    Aug 2016
    Posts
    45
    World
    Ares
    . Secret word: ornamentalsmith

  10. #210
    Administrator
    Join Date
    Oct 2017
    Posts
    1,134
    World
    Zeus
    Thank you everyone that participated in this event! I truly hope you enjoyed it and I will be going through the winners for this! I hope to have the rewards out some time this week. I hope everyone enjoyed it and while it was not a difficult code to crack or one that was 'real' code, it should have given some a bit of light into coding.

    -BB_Odhran

Closed Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts