ogram? 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 (x % 2 == 0) : continue print (x)
Answers
Answered by
0
Explanation:
Python range() is a built-in function available with Python from Python(3.x), and it gives a sequence of numbers based on the start and stop index given. In case the start index is not given, the index is considered as 0, and it will increment the value by 1 till the stop index.
For example range(5) will output you values 0,1,2,3,4 .The Python range()is a very useful command and mostly used when you have to iterate using for loop.
Answered by
5
This is your answer
Thank u
Attachments:
Similar questions