B01C-2017D – Computer Sir Ki Class

Login


Lost your password?

Don't have an account ?
Register (It's FREE) ×
  

Login
[lwa]



Exam Questions-CBSE12D-2017-B01C #PYTHON#6394    siteicon   siteicon  

Problem Statement - B01C-2017D

Rewrite the following code in python after removing all syntax error(s). Underline each correction done in the code

TEXT=""GREAT
DAY""
for T in range[0,7]:
    print TEXT(T)
print T+TEXT

Solution

TC++ #6394

TEXT= "GREAT"
DAY =""
for T in range (0,7) :
    print TEXT [T]
print T,TEXT

Also range(0,7) will give a runtime error as the index is out of range. It should be range(0,5)


Share

CSKC| Created: 12-Jan-2019 | Updated: 12-Jan-2019|CBSE12D-2017









Back