Question 19Asked in Bihar STET 2025 Paper II Computer Science, 4 Nov 2025, Shift 2 (2:00 PM)

Consider the statements given below and then choose the correct output from theनीचे दिए गए स्‍टैटमेंट्स (Statements) पर विचार कीजिए और फिर दिये गये विकल्‍पों (Options) में से

Consider the statements given below and then choose the correct output from the given options : D={ 'S01 ' : 95, 'S02' : 96 } for I in D : print ( I , end = '#' )
नीचे दिए गए स्‍टैटमेंट्स (Statements) पर विचार कीजिए और फिर दिये गये विकल्‍पों (Options) में से सही आउटपुट (output) चुनिये : D={ 'S01 ' : 95, 'S02' : 96 } for I in D : print ( I , end = '#' )
  1. AS01#S02#S01#S02#
  2. B95#96#95#96#
  3. CS01,95#S02,96#S01,95#S02,96#
  4. DS01#95#S02#96#S01#95#S02#96#
Show answerHide answer

Correct answer: (A) S01#S02#S01#S02#

Explanation

Looping over a dictionary gives its keys, not its values. So the loop prints each key followed by '#': S01#S02#.Dictionary पर लूप चलाने से उसकी keys मिलती हैं, मान नहीं। इसलिए लूप हर key के बाद '#' प्रिंट करता है: S01#S02#।

From Bihar STET 2025 Paper II Computer Science PYQ, 4 Nov 2025, Shift 2 (2:00 PM)

This is question 19 of Bihar STET 2025 Paper II Computer Science PYQ, 4 Nov 2025, Shift 2 (2:00 PM). See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.