0
String
I wrote the program, but she gave an error word=('00000') print(word) bit={ } bit[0]=word i=0 while 32: i+=1 #The start of block d=4 n=word[:d]+'1' bit[i]=n #The end of block print(bit) error: 00000 Traceback (most recent call last): File "source_file.py", line 13, in <module> bit[i]=n #The end of block MemoryError
2 odpowiedzi
+ 7
while 32 is an infinite loop. Probably went out of memory during execution.
+ 5
'while 32:' is equivalent to 'while True:', so you make an infinite loop ^^
I guees you would do 'while i < 32:' ;)