Files
inf-kswo/IO/Eingabe Umwandlung easy.py
Janis Hutz ede0ee318b Format
There really is no hope of making this code even half-way decent without
spending the time to rewrite them all properly. Don't want to do any of
that
2025-11-03 17:08:35 +01:00

19 lines
328 B
Python
Executable File

eingabe = int(input("Zahl im Dezimalsystem: "))
system = int(input("Zahlensystem: "))
if system == 2:
y = bin(eingabe)
print("Resultat:", y)
elif system == 16:
y = hex(eingabe)
print("Resultat:", y)
elif system == 8:
y = oct(eingabe)
print("Resultat:", y)
else:
print("wrong")