Question: Write this program in scala. 4. Problem Write a random word generator: val almkWordal Stringltikizlrbmx val a2mkWord> a2: String iceqyxdtcqx val a3mkWord> a3: String dcjjqsecegi
Write this program in scala. 
4. Problem Write a random word generator: val almkWordal Stringltikizlrbmx val a2mkWord> a2: String iceqyxdtcqx val a3mkWord> a3: String dcjjqsecegi val a4mkWord (20) -> a4 String erlazfucnscevefzaaviv Note: Words only contain lowercase letters. The average length should be approximately the average length of words in an English dictionary. Hints: Before your definition of mkWord type: imp rt scala . util . Random Random is Scala's random number generator. It's a pre-defined object, though, not a class. Given a random UNICODE, x, the expression x.toChar will convert it into the corresponding character For example scala> 0x61.toChar res4: Char -a Another hint: Scala functions can take default arguments def display (prompt: String) i print (prompt) scala> display
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
