質問するログイン新規登録

回答編集履歴

3

修正

2017/07/19 11:31

投稿

退会済みユーザー
answer CHANGED
@@ -47,9 +47,9 @@
47
47
  def check(input)
48
48
  case input
49
49
  when %w[× ×] then '低い'
50
- when %w[× ○] then '普通'
50
+ when %w[× ○] then '普通'
51
- when %w[○ ×] then 'やや高い'
51
+ when %w[○ ×] then 'やや高い'
52
- when %w[○ ○] then '高い'
52
+ when %w[○ ○] then '高い'
53
53
  else 'エラー'
54
54
  end
55
55
  end

2

修正

2017/07/19 11:31

投稿

退会済みユーザー
answer CHANGED
@@ -43,11 +43,10 @@
43
43
  # encoding : utf-8
44
44
 
45
45
  ans = [['×', '×'], ['×', '○'], ['○', '×'], ['○', '○']]
46
- ans.shuffle!
47
46
 
48
47
  def check(input)
49
48
  case input
50
- when %w[× ×] then '低い'
49
+ when %w[× ×] then '低い'
51
50
  when %w[× ○] then '普通'
52
51
  when %w[○ ×] then 'やや高い'
53
52
  when %w[○ ○] then '高い'
@@ -55,7 +54,7 @@
55
54
  end
56
55
  end
57
56
 
58
- ans.each do |e|
57
+ ans.shuffle.each do |e|
59
58
  puts "回答[#{e.join(' ')}] : #{check(e)}"
60
59
  end
61
60
 

1

修正

2017/07/19 11:31

投稿

退会済みユーザー
answer CHANGED
@@ -51,6 +51,7 @@
51
51
  when %w[× ○] then '普通'
52
52
  when %w[○ ×] then 'やや高い'
53
53
  when %w[○ ○] then '高い'
54
+ else 'エラー'
54
55
  end
55
56
  end
56
57