Question: Write following functions. (a) A function called largerThan11 that checks whether the integer parameter is larger than 11, return true if it is, return false

Write following functions. (a) A function called largerThan11 that checks whether the integer parameter is larger than 11, return true if it is, return false otherwise. (b) A function called rollDice that returns a random dice value (1-6). (c) A function called emphasis which print a string parameter 3 times to screen.(use loop). In your main function. 1. Use function roll dice three times, to generate 3 dice values. Print each number to screen. 2. Add previous dice values together to a variable called sum. Print out the sum to screen. 3. Use function largerThan11, to check whether the sum is greater than 11. 4. Repeat step 1, 2, 3 until the sum is larger than 11. 5. Use function emphasis, to print out string "Yes! Finally." 3 times to screen. Output should look similar to example below: Part A: Roll dice: 2 2 5 Sum = 9 Roll dice: 4 6 5 Sum = 15 Yes! Finally.Yes! Finally.Yes! Finally.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!