Thursday 4 June 2015

As far I learned.


Hello champs!

Cool Thursday and quiet one. I am in a mini holiday. Courses only on Wednesday and Friday till 19 June 2015.

Wake up around 09h00. Didn't do anything about Nothing xD... watching videos on YouTube and surf and yeah i even eat #FOOD lol

I went in a prayer at my grand-pa, had some good #briyani (My favorite dish) and return home at 19 h 40. Yeah as usual my mind is always ready to code and my heart is viewing my list of code from the grey memory. :)

Here is the "Printing and Printing and Printing"


















Start coding, Still a beginner on ruby but as far i really enjoy the #coding . After learning variables and other stuffs so today i start by learning how to input from keyboard. On this let take a look at the picture below :


















After trying this one then i learn about Argument (ARGV)

What is ARGV? first when i look at this word, I started creating word from it instead of searching for its real meaning. Creating weird word OMG i dont even know where these words come from.

ARGV in ruby is an array variable which holds, as strings, each argument passed by the shell. The following program iterates over the ARGV array and prints out its contents.

ARGV full explanation.
You already know what will be next!

Here we go :)


















Coding part:

Keys: \n - change line

        : ARGV.first (call the argument which has input while executing the file. " # ruby ex14.rb muz"
         
        : $stdin - standard input.

        : gets.chomp - input string



















That's it for today *yawn*!

Tomorrow french course, off to bed ^^ Nites.









2 comments:

  1. Making good progress on ruby !

    ReplyDelete
    Replies
    1. Yeah :) i am really happy :) more to come :D Thanks to you dude :)

      Delete