Skip to content

Commit

Permalink
Change methods not using its bound instance to staticmethods
Browse files Browse the repository at this point in the history
  • Loading branch information
deepsource-autofix[bot] committed Jun 22, 2022
1 parent 0334531 commit 4061a8a
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions Project Pemrograman.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@

class Komputasi :
# menu
def menu (self) :
@staticmethod
def menu () :
menu = """
Menghitung Cepat Rambat Gelombang Bunyi:
1. Medium Padat
Expand All @@ -12,17 +13,20 @@ def menu (self) :
"""
return menu
# medium padat
def padat (self, E, ρ) :
@staticmethod
def padat (E, ρ) :
hasil = (E / ρ) ** 0.5
return hasil

# medium cair
def cair (self, β, ρ) :
@staticmethod
def cair (β, ρ) :
hasil = (β / ρ) ** 0.5
return hasil

# medium gas
def gas (self, γ, R, T, Mr) :
@staticmethod
def gas (γ, R, T, Mr) :
hasil = (γ * R * T / Mr) ** 0.5
return hasil

Expand Down

0 comments on commit 4061a8a

Please sign in to comment.