回答編集履歴

3

修正

2017/07/19 11:31

投稿

退会済みユーザー
test CHANGED
@@ -96,11 +96,11 @@
96
96
 
97
97
  when %w[× ×] then '低い'
98
98
 
99
- when %w[× ○] then '普通'
99
+ when %w[× ○] then '普通'
100
100
 
101
- when %w[○ ×] then 'やや高い'
101
+ when %w[○ ×] then 'やや高い'
102
102
 
103
- when %w[○ ○] then '高い'
103
+ when %w[○ ○] then '高い'
104
104
 
105
105
  else 'エラー'
106
106
 

2

修正

2017/07/19 11:31

投稿

退会済みユーザー
test CHANGED
@@ -88,15 +88,13 @@
88
88
 
89
89
  ans = [['×', '×'], ['×', '○'], ['○', '×'], ['○', '○']]
90
90
 
91
- ans.shuffle!
92
-
93
91
 
94
92
 
95
93
  def check(input)
96
94
 
97
95
  case input
98
96
 
99
- when %w[× ×] then '低い'
97
+ when %w[× ×] then '低い'
100
98
 
101
99
  when %w[× ○] then '普通'
102
100
 
@@ -112,7 +110,7 @@
112
110
 
113
111
 
114
112
 
115
- ans.each do |e|
113
+ ans.shuffle.each do |e|
116
114
 
117
115
  puts "回答[#{e.join(' ')}] : #{check(e)}"
118
116
 

1

修正

2017/07/19 11:31

投稿

退会済みユーザー
test CHANGED
@@ -104,6 +104,8 @@
104
104
 
105
105
  when %w[○ ○] then '高い'
106
106
 
107
+ else 'エラー'
108
+
107
109
  end
108
110
 
109
111
  end