Computer Science, asked by shineeMD, 9 months ago

what will be the output of following code?

For element in [10,15,20,25]:

Print(element + 2,end= ‘ ‘)

a)12 17 22 27

b)12172227

c)error

d)17 22 27 12​

Answers

Answered by yogesh3singh
0

Answer:

c) error

Explanation:  because the syntax of the code is not correct. The "For" and "Print" should be in lower case i.e, for and print.

If we make the syntax correct and then try to run the code then it will show

option (a)

in the output terminal because for is an iterator so it will iterate till the list becomes empty. It stores value in the element variable and increment by 2 and the print the value in same line.

Similar questions