Showing posts with label python game snake water and gun. Show all posts
Showing posts with label python game snake water and gun. Show all posts

Thursday, August 20, 2020

Python game Snake , Gun and Water very easy to develop and play. Here is full source code of game.

 #Python game Snake , Gun and Water

#Developed by Eaglesoft programmer Muhammad Ashfaq

import random

lst=['s','g','w']

chance=10

no_of_chance=0

human_score=0

computer_score=0

_tie=0

invaild_input=0

print("********Game********")

_user=str(input("Enter you're name:"))

print(f"Dear {_user} Please input you're choice")

print("s for:Snake\ng for:Gun\nw for:Water")

while(no_of_chance<chance :="" _input="=" _random="=" _tie="_tie+1" again="" ame="" and="" choice="" computer="" computer_score="" elif="" else:="" f="" g="" human_score="" ie="" if="" input="" invaild_input="invaild_input+1" is:="" is="" no_of_chance="no_of_chance+1" nter="" nvaild="" or="" ou="" please="" print="" random="" re="" s="" score="" summary="" try="" w="" win="" you="">computer_score:

    print(f"Congratulation! {_user} You win")

elif computer_score&gt;human_score:

    print("Computer win")

else:

    print("Tie")

print(f"{_user} You're Total score is :{human_score}")

print(f"Computer total score is:{computer_score}")

print(f"Number of times Tie :{_tie}")

print(f"Number of Times invaild input:{invaild_input}")</chance>