Computer Science, asked by arun1974yadav1212, 6 months ago

(f) Predict the output of the following:
2.
Arr=[1,2,3,4,5,6,1
for i in range(1,6):
arr[i-1]=arr[i]
for i in range(0,4):
print(arr[i], end=" ")​

Answers

Answered by Zhangh
0

Answer:

arr= [1,2,3,4,5,6]

for i in range (1,6):

   arr[i-1] = arr[i]

   for i in range (0,6):

       print(arr[i], end =  "")

will give you: 223456233456234456234556234566

Explanation:

With the help of python3 compiler onilne you will get the result. Also, in the old version of python, you mught get a syntax error for end= ""

Similar questions