Flash Sale: Flat 70% + Addl. 25% Off on all Courses | Use Coupon DS25 in Checkout | Offer Expires In

  Enroll Now

Scala - Assessment - Declare a Set of integers

A set is a collection in Scala to store unordered unique items. For example, a set having strings "my" and "name" is defined as:

 var myset:Set[String] = Set("my","name")

Now, let's declare a set of integers, named intSet, having below elements.

  • 2
  • 4
  • 17
  • 19

To accomplish this, we will need to declare the set variable of type Set[Int] as this set is going to have integers only.

INSTRUCTIONS
  • Switch to Jupyter tab.
  • Declare the set variable in Jupyter.
  • Press Shift+Enter.
  • Submit your answer.

No hints are availble for this assesment

Answer is not availble for this assesment


Note - Having trouble with the assessment engine? Follow the steps listed here

Loading comments...