Computer Science, asked by foziya29268a, 3 months ago

for i in [ 2,4,6,8] : print(i//2)
write it's output..
plz ans fast​

Answers

Answered by anindyaadhikari13
2

Required Answer:-

Given c∅de:

for i in [2,4,6,8]:

print(i//2)

To Find:

  • The output of the given c∅de.

Output:

1

2

3

4

Explanation:

The above loop iterates through the list - [2,4,6,8]. After each iteration, it displays the quotient obtained when each number in the list is divided by 2.

// operator is used in floor division. 2//2 = 1, 4//2 = 2 and so on.

So, it prints the values of 2//2, 4//2, 6//2 and 8//2.

Therefore, output goes like -

1

2

3

4

Similar questions