Which of the following while loops in Python will NOT run infinitely (i.e., will not execute even once)?
निम्नलिखित में से कौन सा पायथन while लूप अनंत बार नहीं चलेगा (अर्थात् एक बार भी नहीं चलेगा)?
Solution Breakdown:
-> In Python, 0 evaluates to False and any non-zero number evaluates to True. Since 1 % 1 = 0 (False), while 1 % 1: never enters the loop.
-> Hence, Option (C) is the correct answer.
-> पायथन में 0 का अर्थ False होता है। चूंकि 1 % 1 = 0 है, इसलिए यह लूप एक बार भी नहीं चलेगा।
-> इसलिए विकल्प (C) बिल्कुल सही है।