subject

Complete the definitions of the following two functions in Scala: def convertNum2Binary(num: Int): String =
def convertFraction2Binary(num: Double): String =

Here are sample calls to these functions:

convertNum2Binary(100) = "1100100"
convertFraction2Binary(0.375) = ".011"
convertFraction2Binary(0.8) = ".11001100110011001100110"

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 02:00
Aisha has finished working on a word processing document that contains 15 pages. she has added some special elements in the first three pages, page 9 and 10, and page 15 from the document. she wants to print only these pages to see how they look. which option is the correct way to represent (in the print dialog box) the pages that aisha wants to print?
Answers: 3
question
Computers and Technology, 22.06.2019 20:00
Amanda needs to create an informative print brochure for her local library’s fundraiser dinner. what critical detail must she have before she starts designing the brochure?
Answers: 1
question
Computers and Technology, 22.06.2019 22:30
Jason needs to learn a new web tool. he went through his books to understand more about it. now he wants hands-on experience with using that tool. what would him? jason can use websites where workspace is provided to test the results of your code.
Answers: 2
question
Computers and Technology, 24.06.2019 00:30
Which boolean operator enables you to exclude a search term? a} not b} and c} or d} plus
Answers: 1
You know the right answer?
Complete the definitions of the following two functions in Scala: def convertNum2Binary(num: Int):...
Questions
question
Biology, 26.09.2019 14:30
Questions on the website: 13722361