Writing a Simple terminal based Dice Game in Python

Last week, We were given a task and that was to show a project (Game, app or script), where we had to use tools that we have learned so far.

I was busy this weekend shifting my hostel and I forgot to complete the task. So I decided to write a simple Dice Game.

Coming to the code of the game. This is a terminal based game without using any graphics. You will roll a die and If Six comes, You will win the Game :). I used random module to generate random numbers. When user will roll the die, randit function generates a random number between 1,6. You will have a better luck if you get a Six.

Since writing code was not only part of the task, but to use tools taught during the session. So I used following tools for my development

  • Vim – Code Editor
  • Git
  • Github
  • Markdown
  • Python

I created Python Small Projects repo on GitHub and pushed code there.

I will write more scripts or silly games to that repo as I am practicing Python these days. I will also add python scripts, that I wrote a few days back and already using.

Please Look at Code and Repo and If find error and improvement, Create and Send a pull request.

Github Repo Link: https://github.com/iKshitiz/Python_Small_Projects

2 thoughts on “Writing a Simple terminal based Dice Game in Python

Leave a comment