Selection Ex 5 - Dice Simulation

Created By: M Ritter | Difficulty Level: 2

Description

Write a program to simulate the throw of two dice (each between 1 and 6). Display the numbers representing each dice. If the numbers on the two dies are not equal, the player's score is the sum of the numbers thrown. Display the score. If the numbers on the two dice are equal, the player scores twice the sum of the number thrown. Display 'You threw a double' and the score.

Puzzle

Drag from here

  • OUTPUT num1
  • ELSE
  • SET num2 = random(1..6)
  • SET num1 = random(1..6)
  • OUTPUT num2
  • OUTPUT score
  • IF num1 = num2 THEN
  • OUTPUT "You threw a double" + score
  • BEGIN
  • ENDIF
  • END
  • CALCULATE score = (num1 + num2) * 2
  • CALCULATE score = num1 + num2

Construct your solution here