Advertisements
Advertisements
Question
Write a note on the range () in the loop?
Advertisements
Solution
Usually in Python, for loop uses the range() function in the sequence to specify the initial, final, and increment values. range() generates a list of values starting from start till stop – 1.
APPEARS IN
RELATED QUESTIONS
Which statement is generally used as a placeholder?
Which is the most comfortable loop?
What is the output of the following snippet?
i=1
while True:
if i%3 ==0:
break
print(i,end='')
i +=1
Write is the syntax of if..else statement?
Write a program to display.
A
A B
A B C
A B C D
A B C D E
Using if..else..Elif statement writes a suitable program to display the largest of 3 numbers.
Write the syntax of the while loop.
Write a detail note on for loop?
Write a program to display all 3 digit odd numbers.
Write a program to display a multiplication table for a given number.
