predict the outcome of the following code x=100 y=30 for I in the range (x-y×3) print ("$",I)
Answers
Answered by
1
Question:-
- Predict the output of the following code.
Solution:-
Given code,
x=100
y=30
for I in range (x-y*3):
print ("$",I)
Here,
x-y*3=100-90=10
So, the loop runs from 0 to 9
Output:-
$0
$1
$2
$3
$4
$5
$6
$7
$8
$9
Similar questions
Computer Science,
3 months ago
Science,
3 months ago
Geography,
7 months ago
Hindi,
7 months ago
Social Sciences,
1 year ago
Social Sciences,
1 year ago
Business Studies,
1 year ago