Skip to content

Instantly share code, notes, and snippets.

@savolla
Created March 1, 2017 00:32
Show Gist options
  • Save savolla/e94dd6100baa28a79bee4b5401ab91fe to your computer and use it in GitHub Desktop.
Save savolla/e94dd6100baa28a79bee4b5401ab91fe to your computer and use it in GitHub Desktop.
this program is very very vveeeerryyy bad... don't even run it
'''
tryhard bir program olduğu için sadece
tek basamaklı sayılarla işlem yapabilme
yeteneğine sahip...
'''
rakam_listesi = [0,1,2,3,4,5,6,7,8,9]
def toplama(a,b):
c = a + b
print(c)
def çıkarma(a,b):
c = a - b
print(c)
def çarpma(a,b):
c = a*b
print(c)
def bölme(a,b):
c = a/b
print(c)
def işlemler():
işlem = input("işleminizi giriniz: ")
if "+" in işlem:
toplama(int(işlem[0]),int(işlem[2]))
elif "-" in işlem:
çıkarma(int(işlem[0]),int(işlem[2]))
elif "*" in işlem:
çarpma(int(işlem[0]),int(işlem[2]))
elif "/" in işlem:
bölme(int(işlem[0]),int(işlem[2]))
işlemler()
işlemler()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment