🚀 Hurry! Offer Ends In
00 Days
00 Hours
00 Mins
00 Secs
Enroll Now
X

आउटपुट निर्धारित करें:

Determine the output :

for i in range(20,30,10) :
      j=i/2
      print(j)
A)
B)
C)
D)

Explanation:

Let's break down the code:

for i in range(20, 30, 10):
    j = i / 2
    print(j)

Explanation:

  • range(20, 30, 10) generates numbers starting from 20, ending before 30, with a step of 10.

    • This will generate the numbers: 20 and 30, but since the range is exclusive of 30, the loop will only run for i = 20.
  • Inside the loop:

    • For i = 20, j = i / 2, so j = 20 / 2 = 10.0.
  • print(j) will print 10.0.

Output:

(C) 10.0

Latest Updates