Q. Write the output of the following:


(i)

for i in '123':

    print("guru99", i)


(ii)

for i in [ 100, 200, 300] :

    print(i)


(iii)

for j in range (10, 6, -2):

    print (j * 2)


(iv)

for x in range (1, 6):

    for y in range (1, x+1) :

        print (x,' ', y )


(v)

for x in range (10, 20):

    if (x == 15):

        break

    print (x)


(vi)

for x in range (10, 20) :

    if (x % 2 == 0) :

        continue

    print (x)



Answer =

Outputs: -

(i)

guru99 1
guru99 2
guru99 3

(ii)

100
200
300

(iii)

20
16


(iv)

1   1
2   1
2   2
3   1
3   2
3   3
4   1
4   2
4   3
4   4
5   1
5   2
5   3
5   4
5   5

(v)

10
11
12
13
14

(vi)

11
13
15
17
19

2 Comments

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

  1. Hello 👋

    ReplyDelete
  2. n-1 charecter you forgot to take correct the answers

    ReplyDelete

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post