Ruby programming language.
Introduction to Ruby language.
Ruby is an object-oriented programming language developed by Yukihiro Matsumoto.
It is inspired by other low level programming languages like lisp, small talk and pearl and uses syntax that is easy for C and java programmers to learn.
It is a dynamic and open source programming language with a focus on simplicity and productivity ,has
an elegant syntax that is natural to read and easy to write
Features of Ruby
- object oriented
- dynamic
- meta programming
- flexibility
- variables and scope
Advanced Features
- Exceptions for handling errors
- garbage collector
- os - independent threading , which allows you to write multi - threaded applications even on operating system such as dos
- you can write extensions to ruby in c
Why Ruby?
- Ruby is a server -side scripting language. It can be embedded into HTML .
- Its is also used to build web applications and it has uses English words.
- Like python it is also used for data analysis , prototyping and it is a flexible language.
Lets get started
Inputs
Inputs are of two types:
- Compile time (Defined)
- Run time(Uses defined)
Simple code to print hello world.
puts "Hello world"
Printing Hello World
puts "Hello world"
Here we can see printing anything in ruby is very easy by giving puts before the statement.
Getting input from the user.
Super
ReplyDeleteNice da 💯
ReplyDeleteSuper mame💥💥
ReplyDelete