Computer Science
Find the errors. State reasons.
for Name in [Amar, Shveta, Parag]
IF Name[0] = 'S':
print(Name)
Related Questions
Find the errors. State reasons.
t = [1, "a", 9.2] t[4] = 6
Find the errors. State reasons.
t = 'hello' t[0] = "H"
Assuming words is a valid list of words, the program below tries to print the list in reverse. Does it have an error ? If so, why ? (Hint. There are two problems with the code.)
for i in range(len(words), 0, -1): print(words[i], end=' ')
What would be the output of following code if
ntpl = ("Hello", "Nita", "How's", "life?") (a, b, c, d) = ntpl print ("a is:", a) print ("b is:", b) print ("c is:", c) print ("d is:", d) ntpl = (a, b, c, d) print(ntpl[0][0]+ntpl[1][1], ntpl[1])