हिंदी

Write the output from the following code: y = 2000 if (i%4==0): print "Leep Year" else: print "Not leep year"

Advertisements
Advertisements

प्रश्न

Write the output from the following code:

 y = 2000
if (i%4==0):
     print "Leep Year"
else:
     print "Not leep year"
कोड लेखन
Advertisements

उत्तर

The variable i is not defined in this independent code fragment. Therefore, Python 3 gives:

NameError: name 'i' is not defined

y = 2000 is assigned but is not used.

shaalaa.com
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 1: Review of Phython - EXERCISE [पृष्ठ २४]

APPEARS IN

सीबीएसई Computer Science with Python [English] Class 12
अध्याय 1 Review of Phython
EXERCISE | Q 1. e. | पृष्ठ २४
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×