- Comprehensive Ruby Programming
- Jordan Hudgens
- 86字
- 2021-07-02 21:13:23
Getting input from the Ruby console using gets and chomp
Now that you know how to print values to the console, the next logical step is to know how to get input from users. In this section, we'll walk through how to use the built-in gets and chomp methods in Ruby.
In a real-world application, you'll most likely use web forms or some tool like that to get an input. However, using console tools you'll be able to mimic what a user types into a program.
推薦閱讀
- 極簡算法史:從數學到機器的故事
- 小程序實戰(zhàn)視頻課:微信小程序開發(fā)全案精講
- Visual C++數字圖像模式識別技術詳解
- 我的第一本算法書
- Visual Basic程序設計(第3版):學習指導與練習
- 人臉識別原理及算法:動態(tài)人臉識別系統(tǒng)研究
- 軟件架構:Python語言實現
- 量化金融R語言高級教程
- Visual C#通用范例開發(fā)金典
- PHP編程基礎與實例教程
- 小程序,巧應用:微信小程序開發(fā)實戰(zhàn)(第2版)
- 編寫高質量代碼:改善Objective-C程序的61個建議
- ActionScript 3.0從入門到精通(視頻實戰(zhàn)版)
- Photoshop智能手機APP界面設計
- Thymeleaf 3完全手冊