Fabulous Feb Offer: Flat 70% Off + 20-days Extra Lab + 10% Addl. Off on All Courses | Use Coupon Code FAFB | Expires in

  Enroll Now

Scala

13 / 52
   

Scala - Assessment - Variable Definitions

As part of this exercise, we will learn how to define variables.

INSTRUCTIONS
  • Define an immutable (using val) integer variable my_imx with value 10.

  • Define a mutable (using var) integer variable my_mutx with value 20.

  • Let us define a variable of type String with the name myname and assign it a value "hi".

  • Press "Shift + Enter" to execute the code in the Jupyter notebook.

  • Click on "Submit Answer".


Note - Having trouble with the assessment engine? Check this discussion