Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #1
- def ebob(x,y):
- for i in range (1,x+1):
- if x%i==0 and y%i==0:
- ebob=i
- return ebob
- if int(ebob(5,6))==1:
- print ("qarsiliqli sadedir")
- else:
- print("qarsiliqli sade deyil")
- #2
- def perfect():
- cem=0
- a=int(input())
- for d in range (1,a):
- if a%d==0:
- cem+=d
- if cem==a:
- print("perfect")
- else:
- print("not perfect")
- perfect()
- #3
- def calculator():
- a=int(input("1ci ededi daxil et:"))
- b=int(input("2ci ededi daxil et:"))
- c=int(input("choose the options: 1-toplama 2-cixma 3-vurma 4-bolme"))
- if c==1:
- return a+b
- elif c==2:
- return a-b
- elif c==3:
- return a*b
- else:
- return a/b
- print(calculator())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement