NEW
Font size
WorksheetsRubyquiz
Total questions: 10
Worksheet time: 5mins
A dynamic, reflective, object-oriented, general-purpose programming language. NOT to be confused with Ruby on Rails.
Java
Ruby
Javascript
C++
The ability of a computer program to examine and modify the structure and behavior (specifically the values, meta-data, properties and functions) of the program at runtime.
Object Oriented Programming
Programming Paradigm
Reflective Programming Langauge
Methods
A programming paradigm based on the concept of "objects", which are data structures that contain data, in the form of fields, often known as attributes; and code, in the form of procedures, often known as methods.
Reflective Programming Langauge
Methods
Programming paradigm
Object-oriented-programming
A fundamental style of computer programming, serving as a way of building the structure and elements of computer programs.
Programming paradigm
Methods
Object-oriented-programming
Variables in Ruby
Creator of the Ruby programming language.
Isoraku "Isoku" Yamamoto
Yukihiro "Matz" Matsumoto
Kobayashi "Rindo-Senpai" Rindo
Shunsuke "Shunka-san" Nakamura
Ruby does NOT require a keyword when declaring variables. Ruby uses = (assignment operator) to assign values to variables.
Methods
Basic Ruby arithmetic operators
Variables in Ruby
print - takes whatever you give it and prints it to the screenExample:print "Hello World!"
Multi-Line Comments
Single Line Comment
Puts
puts - adds a new (blank) line after the thing you want to print. NOT used with print, use puts rather than print.Example:puts "Hello World!"
Puts
Method
Line Comment
Text that Ruby won't run as code. Single Line Comments are declared using #. Comments are good for clarifying code and reminders.
Multiple Line Comment
Single Line Comment
Comment
Single-Line Comment
The Ruby method for getting input from the user.
puts
gets
.chomp
