PY
py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#DON'T RUN IT HERE
#COPY THIS PROGRAM AND RUN IT IN ANOTHER PLACE
#SUCH AS Python IDLE or Enthought Canopy or Anaconda
from random import randint as r
from time import sleep as s
def pickxor(basket,pick,number):
copy=basket[:]
copy[pick]-=number
if copy[0]^copy[1]^copy[2]==0:
return True
else:
return False
def mapping(basket):
for i in basket:
if i!=0:
yield basket.index(i)
print('='*72)
print('{:=^72}'.format('Welcome to Basket Game'))
print('{:=^72}'.format('Created by: Ahmad Fahadh Ilyas'))
print('='*72)
print('\nRULE OF GAME:')
print('1. The player goes first. Player and computer take turn alternately')
print("""2. When it's his turn, player must pick one from three baskets
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run