Computer Science, asked by sharmasachin4740003, 3 months ago

What will be the output of the following ?

for x in [10, 20]:

if(x==10):

print(x)

a. 10

b. 20

c. Error
d. Nothing will print​

Answers

Answered by atrs7391
3

Answer:

C. Error

Explanation:

You wrote the program in line 2: for x in [10,20]

Which should be: for x in range [10,20]


sharmasachin4740003: If x = 10, then the cod if x % 2 == 0: will return ……………………………..​
atrs7391: I didn't got your question but if you meant that if x=10 and the condition is given if x%2==0 then what value will the computer give then the computer will return the value TRUE for the condition.
sharmasachin4740003: no one keeps a check on the comments of participants on newspaper
sharmasachin4740003: true or false
Similar questions