X=10 y=5 for i in range(x-y*2): print("%",;)
Answers
Answered by
8
Given:
X=10 y=5 for i in range(x-y*2): print("%",;)
To find:
The output
Solution:
X=10
Y=5
Is given
For loop should run from 0 to x-y2
That is from 0 to 10-52(0)
So the loop should run from 0 to 0
So the loop never runs
So nothing is printed
Corrrection:
print("%",;)
actually this syntax is wront for print()
so it shows syntax error
if it is print(i);
then its correct but the for loop runs 0 times so nothing is printed
excecution:
x=10
y=5
for i in range(x-y2):
print(i)
OUTPUT:
Program finished without any errors
Similar questions
Biology,
5 months ago
India Languages,
5 months ago
English,
5 months ago
Science,
11 months ago
Math,
1 year ago
Political Science,
1 year ago