Please tell me how to write a loop
x=3
for i in range(x):
[if(arr[i]==1)]:
arr[i]=2^(x-i-1)
Hello there please tell me how to set that arr[i] within the for loop, that is going outside of the loop
If array value at a index is 1 I have set it to the power of 2 IDK about this I'm trying for so long. Please help me with this.
Thanks again
Please set up you loop in a common language. You can write a condition for a term not defined and I do not understand what do you expect of your loop.