Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # coded by: salism3
- # 13-09-2019
- class hitung:
- def __init__(self, x, y):
- self.x = x
- self.y = y
- def hitung(self):
- angka = 0
- while angka < self.y:
- angka += 1
- hasil = self.y ** angka
- if hasil == self.x:
- print("[+] Hasil dari " + str(self.x) + " log " + str(self.y) + " adalah: " + str(angka))
- break
- else:
- print("[+] hasil tidak ditemukan")
- def home():
- print("[ Logaritma Dasar ]")
- print("[ Coded by: SalisM3 ]\n")
- a = float(input('[?] Bilangan pokok: '))
- b = float(input('[?] Bilangan yg di-logaritma: '))
- gas = hitung(a,b)
- gas.hitung()
- try:
- home()
- except Exception as e:
- print("[!] " + str(e))
Add Comment
Please, Sign In to add comment