Skip to content

Instantly share code, notes, and snippets.

@symtkn
Created March 20, 2011 01:51
Show Gist options
  • Save symtkn/877983 to your computer and use it in GitHub Desktop.
Save symtkn/877983 to your computer and use it in GitHub Desktop.
kapıların basit versiyonu
#-*- coding: cp1254 -*-
#!/usr/bin/env python
#-*- coding: utf8 -*-
def yol_secici(x,y,z):
if x==0 and y==0 and z==0 :
print "a: 0\nb: 0\nc: 0\nd: 0\ne: 0\nf: 0\ng: 0"
elif x==0 and y==0 and z==1 :
print "a: 1\nb: 0\nc: 0\nd: 0\ne: 0\nf: 0\ng: 0"
elif x==0 and y==1 and z==0 :
print "a: 0\nb: 1\nc: 0\nd: 0\ne: 0\nf: 0\ng: 0"
elif x==0 and y==1 and z==1 :
print "a: 0\nb: 0\nc: 1\nd: 0\ne: 0\nf: 0\ng: 0"
elif x==1 and y==0 and z==0 :
print "a: 0\nb: 0\nc: 0\nd: 1\ne: 0\nf: 0\ng: 0"
elif x==1 and y==0 and z==1 :
print "a: 0\nb: 0\nc: 0\nd: 0\ne: 1\nf: 0\ng: 0"
elif x==1 and y==1 and z==0 :
print "a: 0\nb: 0\nc: 0\nd: 0\ne: 0\nf: 1\ng: 0"
elif x==1 and y==1 and z==1 :
print "a: 0\nb: 0\nc: 0\nd: 0\ne: 0\nf: 0\ng: 1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment