Sha256: 409b75250546f208b6af34f2d2938a1c07d6931d1d9414a6d370959bd3e7eb92

Contents?: true

Size: 843 Bytes

Versions: 1

Compression:

Stored size: 843 Bytes

Contents

require "tanaka_practice/version"

module TanakaPractice

  class Main
    def odd?(n)
      if (n % 2) == 1
        return true
      else
        return false
      end
    end

    def even?(n)
      return ! odd?(n)
    end

    def check_number?(n)
      if(n >= 1000 && n<= 9999 && n % 2)
         return true
      else
         return false
      end
    end

    def enough_length?(t)
      if(t.length >=3 && t.length <=8)
        return true
      else 
        return false
      end
    end

    def divide(n1,n2)
      n3 = n2 / n1
      return n3
    end

    def fizz_buzz(n)
      if n % 3 == 0 && n % 5 == 0
        return "FizzBuzz"
      elsif n % 5 == 0
        return "Buzz"
      elsif n % 3 == 0
        return "Fizz"
      else
        return ""
      end
    end
   
    def hello
     puts "Hello"
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tanaka_practice-0.1.0 lib/tanaka_practice.rb