Although I was enthusiastic about "Let's learn programming !!" Programming seems to be difficult, I can't read English, I'm not good at PC operation itself, For you who were frustrated a long time ago __ Read this article ・ Just move your PC and you'll see "What! Programming is interesting!" The purpose is to make you think. __
I would like to serialize it under the title of Programming Encyclopedia.
This is a continuation of Last time. Let's run it using Ruby in earnest!
puts "Hello World"
Once you've done that, call spotlight with "⌘ + space" and search for "terminal"! Check the following in the terminal.
$ cd desktop $ ls #Check the files contained in the desktop. $ cd sample.rb $ ruby sample.rb #If the content you typed in Vs Code is reflected here, it will be successful Hello World
that's all! From here ** puts "Hello World" ** Let's take a look at the contents of.
** puts "Hello World" ** "Hello World" is a character string to be displayed on the PC. The character string is basically enclosed in "" (double quotation marks) or "" (single quotation marks).
** puts "Hello World" ** puts are methods.
A method is a command army that performs processing in programming. By describing the method name in programming, the method processing is executed. There are various method processes, and ten numerical calculations are possible.
The puts method used this time is a method that outputs characters to the terminal. Insert a half-width space between puts and the character string.
that's all! This time I just output the character string on the screen, Next time I would like to use operators,
─────────────────────────────── ■ Books recommended by the author ───────────────────────────────
"Introduction to Web Technology to Become a Professional"
"How to think about changing jobs"
"High power marketing"
"Courage to be disliked"
─────────────────────────────── ■ Movies recommended by the author ───────────────────────────────
"Dragon Ball Super Broly"
「School of Roc」