12 lines
270 B
Python
12 lines
270 B
Python
# Programm, welches wiederholend dividiert (bis zu Untergrenze)
|
|
|
|
x = round((float(input("Gebe x ein:"))),2)
|
|
|
|
# Verarbeitung mittels while
|
|
untergrenze=1
|
|
index=0
|
|
while x>untergrenze:
|
|
x=x/2
|
|
index=index+1
|
|
print(x)
|
|
print("Es wurde %smal durch 2 geteilt"%(index)) |