Personal memo Progate Ruby I (1)

● What is Ruby?

An object-oriented scripting language developed by Yukihiro Matsumoto. A programming language for building a "system" for web applications.

Similar languages: PHP, Python

1. Ruby execution

>_console

Hello seal

・ Console: Input / output device

2. Ruby basics and strings

puts "Hello seal"

-Instruction "Print the value after puts"

3. Addition / subtraction with numerical values

[Caution]

・ Do not enclose numbers in quotation marks ・ Character strings and numbers are separate

 5 + 2 =7     ← (Numerical value)
"5 + 2"       ← (String)

4. Various calculations

● Addition(+) ● subtraction(-) ● multiplication(/) ● division(%)

5. Concatenation of strings and numbers

puts "Seal" + "That's right" 
>_console

It's a seal

⇒ If you use the + symbol between character strings, Character strings can be concatenated.

puts  3 + 5  → 8  (Numerical value)
puts "3"+"5" →35 (String)      

Recommended Posts

Personal memo Progate Ruby I (2)
Personal memo Progate Ruby I (1)
ruby exercise memo I (puts)
Ruby memo
I started Ruby
[wip] Ruby memo
[Personal memo] I learned a little about modifiers
[Personal memo] Ruby on Rails environment construction (Windows)
[Personal memo] try-catch summary
[Personal memo] I tried to study object orientation lightly
[Personal memo] About Spring framework
Ruby study memo (conditional branching)
[Self-use memo] (Ruby) class, class instance, instance
[Swift] Closure basics (personal memo)
Ruby Learning # 99 Personal Programming Notebook
Personal memo Eclipse plug-in installation
Java study memo 2 with Progate
[Personal memo] Number guessing game
Ruby study memo (recursive function)
Personal memo Lombok's typical annotation
I tried Jets (ruby serverless)
I don't understand Ruby 3 Ractor
[Ruby ~ Iterative processing ~] Study memo 4
Java HashMap, entrySet [Personal memo]
[Ruby 3.0] A memo that I added a type definition to a library I wrote
Ruby design pattern template method pattern memo
Ruby: I made a FizzBuzz program!
Truffle Tutorial Slides Personal translation memo ①
Completed Progate Ruby Learning Course II
Ruby on Rails 6.0 environment construction memo
String output method memo in Ruby
<First post> I started studying Ruby
[Note] [Beginner] Ruby writing memo (refactoring) 1
I tried using Java memo LocalDate