Essay on The Republic Day | Republic Day Essay in English
[ Festival Ganesh Chaturthi Essay in English for Students and Children ] [ Essay on my favourite freedom fighter ] ⚔️ [ दुर्गा पूजा पर निबंध (Durga Puja Hindi Essay) ]
[Essay On 75th Independence Day Of India] [Azadi Ka Amrit Mahotsav Essay in English]

## Which of the following function returns a sequence 0, 1, 2, 3?

Practice for loop Questions – Which of the following function returns a sequence 0, 1, 2, 3?

## How many times is the print statement executed? June 7, 2022 by admin

Practice for loop Questions – How many times is the print statement executed?
for i in range(10):
for j in range(i):
print(i * j)

## Which of the following loops prints “Welcome to Python” 10 times?A

Practice for loop Questions – Which of the following loops prints “Welcome to Python” 10 times?
A:
for count in range(110):
print(“Welcome to Python”)
B:
for count in range(010):
print(“Welcome to Python”)
C:
for count in range(111):
print(“Welcome to Python”)
D:
for count in range(112):
print(“Welcome to Python”)

## Which of the following loops correctly computes 1/2 + 2/3 + 3/4 + …

Practice for loop Questions – Which of the following loops correctly computes 1/2 + 2/3 + 3/4 + … + 99/100?
A:
sum = 0
for i in range(199):
sum += i / (i + 1)
print(“Sum is”, sum)
B:
sum = 0
for i in range(1100):
sum += i / (i + 1)
print(“Sum is”, sum)
C:
sum = 0
for i in range(1.099.0):
sum += i / (i + 1)
print(“Sum is”, sum)
D:
sum = 0
for i in range(1.0100.0):
sum += i / (i + 1)
print(“Sum is”, sum)

## Given the following four patterns,Pattern A

Practice for loop Questions – Given the following four patterns,
Pattern A        Pattern B        Pattern C        Pattern D
1                1 2 3 4 5 6                1      1 2 3 4 5 6
1 2              1 2 3 4 5                2 1        1 2 3 4 5
1 2 3            1 2 3 4                3 2 1          1 2 3 4
1 2 3 4          1 2 3                4 3 2 1            1 2 3
1 2 3 4 5        1 2                5 4 3 2 1              1 2
1 2 3 4 5 6      1                6 5 4 3 2 1                1
Which of the pattern is produced by the following code?
for i in range(16 + 1):
for j in range(6, 0, 1):
print(j if j <= i else” “, end = ” “)
print()

## What is the number of iterations in the following loop: &nbsp

Practice for loop Questions – What is the number of iterations in the following loop:
for i in range(1, n + 1):
# iteration