February 15 - Generating a Sum of Prime Numbers in Ruby
This guide walks through how to generate a sum of prime numbers in Ruby.
Guide Tasks
  • Read Tutorial
  • Watch Guide Video
  • Complete the Exercise
Video locked
This video is viewable to users with a Bottega Bootcamp license

Summary

Create a method that totals a sequence of prime numbers.

Exercise Description

After being provided with a number, generate a sequence of prime numbers that are greater than or equal to the given number, and then return the total of the prime numbers.

Sample Input

42

Expected Output

238

Real World Usage

Prime numbers are important in a number of computer science fields, including: security and linear mathematical implementations. This guide will test your knowledge of how to work with the prime number library provided by Ruby.

Test Cases

Code File