Sha256: f7372a8bb3dce69632f96aa786843bcd46382ec7d98e4e9b0017b7a203d18d3c

Contents?: true

Size: 272 Bytes

Versions: 27

Compression:

Stored size: 272 Bytes

Contents

# -*- coding: utf-8 -*-
# section_2/answer.rb

puts "please input country"
country = gets.chomp

def agreement(country)
  if country == 'japan'
    return 'こんにちは'
  elsif country == 'us'
    return 'hello'
  else
    return '???'
  end
end

# agreement(country)

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
ruby_learner-1.2.9 contents/questions/random_check/section_2/lib/answer.rb
ruby_learner-1.2.8 contents/questions/random_check/section_2/lib/answer.rb
ruby_learner-1.2.7 contents/questions/random_check/section_2/lib/answer.rb
ruby_learner-1.2.6 contents/questions/random_check/section_2/lib/answer.rb
ruby_learner-1.2.5 contents/questions/random_check/section_2/lib/answer.rb
ruby_learner-1.2.4 contents/questions/random_check/section_2/lib/answer.rb
ruby_learner-1.2.3 contents/questions/random_check/section_2/lib/answer.rb
ruby_learner-1.2.2 contents/questions/random_check/section_2/lib/answer.rb
ruby_learner-1.2.1 contents/questions/random_check/section_2/lib/answer.rb
ruby_learner-1.2.0 contents/questions/random_check/section_2/lib/answer.rb
ruby_learner-1.1.15 questions/random_check/section_2/lib/answer.rb
ruby_learner-1.1.14 questions/random_check/section_2/lib/answer.rb
ruby_learner-1.1.13 questions/random_check/section_2/lib/answer.rb
ruby_learner-1.1.11 questions/random_check/section_2/lib/answer.rb
ruby_learner-1.1.10 questions/random_check/section_2/lib/answer.rb
ruby_learner-1.1.9 questions/random_check/section_2/lib/answer.rb
ruby_learner-1.1.8 questions/random_check/section_2/lib/answer.rb
ruby_learner-1.1.7 questions/random_check/section_2/lib/answer.rb
ruby_learner-1.1.6 questions/random_check/section_2/lib/answer.rb
ruby_learner-1.1.5 questions/random_check/section_2/lib/answer.rb