Dice Roll game with Python


Dice Roll game with python programming language is easy to make and implement. And this is a very simple program where users can play and make game more easy.

So, Dice Roll game is a python programming language game where a random number is used. And using python as a programming language, you can easy build command line games.

Technologies used

  • Python 2
  • Sublime
  • Jupyter
  • Anaconda

Libraries used

  • time
  • and random

So, Users can run this game through terminal. And He/she only have to type python filename.py

step 2: welcome to roll the dice game

Therefore, this step ask a user to decide to continue or leave. Also, ask users to roll the dice with yes or no question.

Rolling a dice

Therefore, this step ask users if they want to try again. So, users have to type yes to continue to roll the dice. And after rolling a dice, random number is generated which are given above.

step4: end a dice game

Therefore, this step is to end a game by typing no.

And system will ask if users want to continue and if they don’t want to then can type no. And this no statement will end a dice roll game.

Therefore Things to know

  1. You should install python 2.0 to run this game.
  2. And You should install any kind of IDE you are comfortable with python.
  3. So, I recommend you to use jupyter notebook.
  4. And you have to install time and random libraries.
  5. So, install it by: sudo pip install library name.

Therefore, the code looks like this.

So, you can copy this code and can easily run in your system.

Therefore this code can be very helpful to you.


Leave a Reply

Your email address will not be published. Required fields are marked *