x=2
for iin range(x):
X+=
1
print (x) .find the output
Answers
Answered by
1
Let me correct the codes first:
-------------------------------------------
x=2
for i in rage (x):
x+=1
print(x)
-------------------------------------------
The output will be:
---------------------------------------------
3
4
---------------------------------------------
NOTE: I have run it in python cause to me it looks like a python code.
-------------------------------------------
x=2
for i in rage (x):
x+=1
print(x)
-------------------------------------------
The output will be:
---------------------------------------------
3
4
---------------------------------------------
NOTE: I have run it in python cause to me it looks like a python code.
Attachments:
Answered by
3
Output will be:
3
4
The loop will run 2 times and increase the value of x by 1 each time.
Similar questions