Addition Game using Python

Adding something numbers like games using python...

Concept:

It is two players game. first one player start to play game saying something number within 1 - 9, then another one player continue to say the next  number within 1 - 9 until which player is saying a number then it will reaching totally 100 then, which player to lastly saying number that player is win the game.

Program:

for python 3...

n=0
while(n!=100):
    a=int(input("a="))
    if(a>0 and a<=10):
        n=n+a
        if(n==100):
            print("a is win")
        b=int(input("b="))
        if(b>0 and b<=10):
            n=n+b
            if(n==100):
                print("b is win")

-------------------------------------------------

Comments

Popular posts from this blog

Swap file using python

PyCon-India 2019