0% found this document useful (0 votes)
23 views1 page

Object Sheet1 (Println ("Welcome To The Scala Worsheet) Val Answer 8 5 2 Answer 0.5 ("Hello, " + Answer) .Tolowercase)

This Scala code defines an object that first prints a welcome message. It then calculates the value of 8 * 5 * 2 and stores it in the variable "answer". Finally, it takes half of the value of "answer" and concatenates the string "Hello," with the lowered case value of "answer".

Uploaded by

Christian Campos
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views1 page

Object Sheet1 (Println ("Welcome To The Scala Worsheet) Val Answer 8 5 2 Answer 0.5 ("Hello, " + Answer) .Tolowercase)

This Scala code defines an object that first prints a welcome message. It then calculates the value of 8 * 5 * 2 and stores it in the variable "answer". Finally, it takes half of the value of "answer" and concatenates the string "Hello," with the lowered case value of "answer".

Uploaded by

Christian Campos
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

object Sheet1 {

println("Welcome to the Scala worsheet)


val answer = 8 *5 2
answer * 0.5
("Hello, " + answer).toLowerCase
}

You might also like