Computer Science, asked by Chiefmortis, 4 months ago

predict the outcome of the following code x=100 y=30 for I in the range (x-y×3) print ("$",I)​

Answers

Answered by anindyaadhikari13
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