Computer Science

Welcome to a Novice Computational Thinking (CT) Challenge



Thinking about
Pseudo Code

Sample Code in Python

Program
Roll a Dice Six Times

Dice Roll The user has created an empty file called "Dice Rolls.txt".
The user wants the result of 6 rolls of a dice stored in the txt file.
Write a program that simulates the roll of a dice.
The program should also tell the user the dice is about to be rolled.
A random number between 1 and 6 is generated.
The result is displayed to the user.
Also the result should be stored in the file called "Dice Rolls.txt".

Write the reverse program to read the txt file and calculate the mean outcome of the six rolls of the dice.



The sandbox below can be used to run the sample Python code or to play around with your own ideas.
Be careful of certain limitations of online IDEs compared to those downloaded to your devices.