(self, number, denominator)
return final_number
Rounds a number.

        Args:
            number (int|float): The number to round.
            denominator (int): The denominator.
Rounds a number.
Rounds a number .
def rounded_number(self, number, denominator):
        """Rounds a number.

        Args:
            number (int|float): The number to round.
            denominator (int): The denominator.
        """
        rounded = str(round(Decimal(number)/Decimal(denominator), 1))
        replace_trailing_zero = re.compile('0$')
        no_trailing_zeros = replace_trailing_zero.sub('', rounded)
        replace_trailing_period = re.compile('\.$')
        final_number = replace_trailing_period.sub('', no_trailing_zeros)
        return final_number
def rounded_number ( self , number , denominator ) : rounded = str ( round ( Decimal ( number ) / Decimal ( denominator ) , 1 ) ) replace_trailing_zero = re . compile ( '0$' ) no_trailing_zeros = replace_trailing_zero . sub ( '' , rounded ) replace_trailing_period = re . compile ( '\.$' ) final_number = replace_trailing_period . sub ( '' , no_trailing_zeros ) return final_number