"""
Author: Michel Peltriaux
Organization: Struktur- und Genehmigungsdirektion Nord, Rhineland-Palatinate, Germany
Contact: michel.peltriaux@sgdnord.rlp.de
Created on: 17.09.21

"""


def format_german_float(num) -> str:
    """ Writes a float into a string based on german float notation

    10000.000  --> "10.000,00"

    Args:
        num (float): The number

    Returns:
        num (str): The number as german Gleitkommazahl
    """
    return format(num, "0,.2f").replace(",", "X").replace(".", ",").replace("X", ".")
