Q&A CBSE12D-2017-B01C #6394
Question:
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
Answer:
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)
