=begin
https://www.onlinegdb.com/online_ruby_interpreter
=end

 def hellor
      puts "Hello my first Ruby code!"
 end

 def calculate (m, n, o)
      total = m * n * o
      puts "this is the total", total
 end

 def playarray
   array = ["AA", "BB", 33, 21.22, "EE"]
   puts array[0]
   puts array[1]
   puts array[2]
   puts array[3]
   puts array[4]
 
   array[3] = "XXYY"
   puts array[6]
 end

 def playstring
  telly = 2
  puts telly
  telly = "HEY!"
  puts telly 
  gary = "my world"
  telly = telly + gary 
  puts telly
 end

mynum = 0
mynum = mynum + 444

if mynum > 1 
    if mynum < 10
        puts "It is 4", mynum, "oh ok"
    end
end

if mynum > 1 && mynum < 10
    playstring
elsif mynum <= 2 && mynum!= 0
    playarray
else
   puts "What? Pls enter a name"
   name = gets
   puts "Hello #{name}, long time no see"
end


i = 0
num = 4

while i < num  do
   puts(i)
   i +=1
end

i = 0
num = 4

begin  
   puts(i)
   i +=1
end while i < num


i = 0
_num = 4

begin  
   puts(i)
   i +=1
end until i >= _num

i = 0
num = 4

for i in 0..num
   puts i
end

hellor
calculate 2,3,4
