Files
ruby-examples-1/level2/19.rb
2026-01-15 14:01:21 +09:00

12 lines
218 B
Ruby
Executable File

#!/usr/bin/ruby
# -*- coding: utf-8 -*-
=begin
비밀번호 길이가 8자 이상인지 검사하는 메서드
=end
def password_valid?(pw)
pw.length >= 8
end
puts password_valid?("dfjirgaofmrioa") ? "OK" : "Nope"