By the end of this exercise a student should be able to:
- Read programs to determine their flow
- Comment programs to document their flow
- Reason about the results that a program will return
- Fork this exercise on Github, and clone it to your system
- Run
bundle install
to ensure that you have all needed ruby gems needed for this program - Follow along and comment the code in
lib/triangle.rb
andlib/triangle/valid_triangle.rb
- (optional) follow along and comment the tests in
spec/valid_triangle_spec.rb
. Try out the tests by runningrspec spec/valid_triangle_spec.rb
- In
lib/is_prime.rb
write a method (we will go more into these soon) that returns true or false if a number is prime. - Do not use gets or puts.
- Test your results by running
rspec spec/is_prime_spec.rb