サクサク読めて、アプリ限定の機能も多数!
トップへ戻る
やる気の出し方
ruby-puzzles-2022.cookpad.tech
Goal You can run the Ruby code on a modern browser like Google Chrome. Try to press "Run Ruby" button. Observe the behavior of method func1 and define a method answer1 that performs the same behavior as func1. # You can call `func1` p func1(0) #=> 1 p func1(1) #=> 2 p func1(2) #=> 3 # Can you tell how `func1` is defined? # Hint: def func1(n) = n + ??? # Define `answer1` that works like `func1` def
このページを最初にブックマークしてみませんか?
『Cookpad Code Puzzle 2022』の新着エントリーを見る
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く