Die Suche ergab 2 Treffer

von bikehiro_57
Montag 25. November 2024, 21:14
Forum: Allgemeine Fragen
Thema: Function "round"
Antworten: 6
Zugriffe: 2654

Re: Function "round"


#import math # Variante 2 Module "math" importieren
# a^2 + b^2 = c^2

a = float(input("Länge der Ankathete (cm): "))
b = float(input("Länge der Gegenkathete (cm): "))

c = (a**2 + b**2)**0.5 # Variante 1!!
#c = math.sqrt(a**2 + b**2)

print(f"Die Hypotenuse ist {c} cm lang. ")

Hallo,
wie bringe ...
von bikehiro_57
Samstag 23. November 2024, 15:24
Forum: Allgemeine Fragen
Thema: Function "round"
Antworten: 6
Zugriffe: 2654

Function "round"

#import math # Variante 2 Module "math" importieren
# a^2 + b^2 = c^2

a = float(input("Länge der Ankathete (cm): "))
b = float(input("Länge der Gegenkathete (cm): "))

c = (a**2 + b**2)**0.5 # Variante 1!!
#c = math.sqrt(a**2 + b**2)

print(f"Die Hypotenuse ist {c} cm lang. ")

Hallo,
wie bringe ...