Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Hand Cricket ✋ 🏏

Aim

To create Hand Cricket game Between User and AI

Purpose

  • Playing Hand Cricket gives relaxation, enjoyment, creativity, prevents boredom.
  • Coding Hand Cricket helps you to improve basics of Python 😄

Short description

  • Hand Cricket is number game between two players.
  • This game is purely luck based game.
  • This code is built simple basics of python like functions, if, elif, else, while loops & Conditionals.
  • Libraries imported:
    • random

Workflow

  • Imported random Library
  • functions used in this game:
    • def toss():
      • This function is for toss user have to choose ODD or EVEN
    • def main():
      • This function is Start of the game
    • def first batting():
      • This function comes when toss winners opted to bat first
    • def second batting():
      • This function comes when toss winners opted to bowl first
    • def playagain():
      • This function is to ask whether user want to playagain or not

Compilation Steps

  • Download the file Hand_Cricket.py
  • Run the file Hand_Cricket.py
  • Okay..!! Let's start our game then. Select ODD or EVEN and input any number between 1 to 10 as your wish.
  • If win the toss, Opt Bat or Ball as your wish.
  • If you opted to bat first and runs will counting continuously and you'll be out when numbers matched. AI will get's it's turn to bat and chase down the target.
  • If picks AI wicket by giving input that matches AI number before the target then you'll be winner else AI is winner.
  • You can play again just by clicking "Yes".
  • Any Invalid input will restart the game. So play carefully.

Output

Hand_Cricket Path Link: https://github.com/DurgaSai-16/Awesome_Python_Scripts/blob/main/BasicPythonScripts/Hand%20Cricket/Images/Hand%20Cricket.jpg

Author:

NALLANI DURGA SAI