From 355543c023ae38a4551d0194bc4e2625a93e8c67 Mon Sep 17 00:00:00 2001 From: Satu Asikainen Date: Sat, 23 Jan 2016 21:18:52 +0200 Subject: [PATCH] =?UTF-8?q?teht=C3=A4v=C3=A4=2010=20palautus=201?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- koodi.rb | 5 +++++ 1 file changed, 5 insertions(+) mode change 100644 => 100755 koodi.rb diff --git a/koodi.rb b/koodi.rb old mode 100644 new mode 100755 index 932f2b3..82a2e8e --- a/koodi.rb +++ b/koodi.rb @@ -1 +1,6 @@ # kirjoita koodi tänne +def avainten_summa(a) + taulu = a.keys + summa = taulu.inject(0){|tulos,x| tulos + x} + return summa +end \ No newline at end of file