age = 12
# comparison: == != < > <= >=
# logical: && || ! and or not
# if
if(age >= 5) && (age <= 6)
 puts "Well"
elsif (age <= 13)
 puts "Nothing"
else
 puts "Just do it"
end 
# ruby-if is much like python's but has this "end" at the end
puts (true && false).to_s
# another operator is <==>
# 5 <=> 10 = -1, 5 <=> 5 = 0, 10 <=> = 1
puts (5 <=> 10).to_s
# unless (another if form)
# unless doesn't have "elsif"
# but you can use "else if" wich would be
# an if inside unless
unless age > 4
 puts "No School"
else
 puts "Go to School"
end
# the following is like python
puts "You're Young" if age < 30
# case
print "Enter Greeting : "
greeting = gets.chomp
case greeting
when "French", "french"
 puts "Bonjour"
 exit
when "Spanish", "spanish"
 puts "Hola"
 exit
else
 puts "Hello"
end
# ruby uses "exit" with conditions instead of the famous "break" keyword
# and uses "next" instead of "continue"
# but ruby also has "break" which is used in loops
# Ternary Operator, same as javascript's
puts (age >= 50) ? "Old": "Young"