This assignment will walk you through several of the most used ruby types and get your familiar with the ruby syntax
Understand how to use documentation and send messages to objects in ruby
- RubyDocs
- the ruby binary
- irb
Link to a GitHub Repo containing the basics.rb
file
The file should run without any errors or warnings and should only print true
Only change the left hand side of each expression to make it true.
The way these questions are written reveals a lot of duplication. Add a question
method that takes two arguments, the prompt for the question, and the body of the question. Use that method to ‘DRY up’ the quiz. Requirements from Normal Mode must continue to be met.
Data structures are awesome. Lets turn our list of questions into a single data structure and print out the answers by looping (or iterating) through them. Make sure each question is labeled with a number automatically. Requirements from Normal Mode must continue to be met.
basics.rb
can be found and downloaded from here
- This assignment requires some googling and looking at the ruby docs.
- Try things out in IRB to see how they work. Its much faster than going directly to the file.