Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def check_exam(arr1, arr2)
- sum = 0
- arr1.each_with_index do |a, i|
- sum += if a == arr2[i]
- 4
- elsif a == ''
- 0
- else
- 1
- end
- end
- sum = 0 if sum < 0
- sum
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement