DICE GAME (PYTHON)

 Hi everyone! Here's yet another code of a simple game in python (related to the random function). This game has a very simple layout but it is the first game I ever made!! I haven't learnt animations yet, but as soon as I learn it, I would try to imply it in this code. 

Instructions of the game will be printed as you run the code. But still, here are the basic instructions and processes of the game (It's literally very simple):-

1. You will be asked to guess a number N= {x:x  N and 1<=N<=6}

2. The code will internally throw a dice, i.e., basically generate a random number between 1 to 6 {both inclusive})

You will win the game if your guess and the throw matches. Otherwise, you will lose.

The code is as follows:-


Pretty simple, but the outputs were fun!

(outputs:-)


(Well, seems like my luck isn't very good today :(. But I am really happy that it's working!!)

This is my second blog about computer science. I hope you guys liked it!!!

THANK YOU!


Comments

Popular Posts