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
English,
2 months ago
Geography,
4 months ago
Hindi,
4 months ago
Social Sciences,
9 months ago
Social Sciences,
9 months ago
Business Studies,
9 months ago