This is a simple 21 number game using Python programming language. The game illustrated here is between the player and the computer. There can be many variations in the game.
1 The player can choose his/her preferences that whether he/she can play first or second.
2 There will be always showing list of numbers before the player takes his turn.
3 if player chooses first chance then he/she can only input the numbers between 0 and 4.
4 if player chooses second chance then he/she can input the numbers but it is prefer to input the numbers between 0 and 4.
5 Most important rule :- player will only input the values in consecutive numbers like (2,3,4,5...)
6 If consecutive numbers are not given in input then the player is automatically disqualified.
7 The player loses if he gets the chance to call 21 and wins otherwise.
if player choose second chance then he/she can win.
1. Fork this repository.
Click on the symbol at the top right corner.
2. Clone the forked repository.
git clone https://github.com/<your-github-username>/Hacking-Scripts3. Navigate to the project directory.
cd Hacking-Scripts/python/21 Number Gamepython 21_number_game.py- First the welcome screen comes and say choose you want to play the game or not.
4. Now i take 1 input value and give the values in consecutive manner and then it will show order of inputs after the computer's turn and agin ask for no. of values.
5. Now i take 1 input value and give the values in consecutive manner and then it will show order of inputs after the computer's turn and agin ask for no. of values.
6. Now i take 1 input value and give the values in consecutive manner and then it will show order of inputs after the computer's turn and agin ask for no. of values.
7. Now final turn! i take 1 input value and give the values in consecutive manner and then it will show Hurray! you won the game shows in above snapshot that means you won.
Contributor
Rahul Srivastava






