Advertisements
Advertisements
प्रश्न
When the same method has to be called repeatedly with different values, the method call is placed inside a ______ (loop/conditions).
रिकाम्या जागा भरा
Advertisements
उत्तर
When the same method has to be called repeatedly with different values, the method call is placed inside a loop.
Explanation:
A loop (like a for or while loop) is used to repeat a block of code multiple times. Placing a method call inside a loop allows you to run it repeatedly with a new value during each turn, whereas conditions (if-else) only execute a piece of code once.
shaalaa.com
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 3: User-Defined Methods - Exercises [पृष्ठ ९१]
