Python to Ruby
Convert this Python code to Ruby. NOTE: This program likely won't run.
Start file
class PythonToRuby: def add(x, y): x + y n = add(1 + 1)
End file
class PythonToRuby def add(x, y) x + y end n = add(1, 2) end
View Diff
1,3c1,4 < class PythonToRuby: < def add(x, y): < x + y --- > class PythonToRuby > def add(x, y) > x + y > end 5c6,7 < n = add(1 + 1) --- > n = add(1, 2) > end
Solutions by @justinjaffray:
Unlock 2 remaining solutions by signing in and submitting your own entry