Rewrite the following code in Python after removing all syntax errors(s). Underline each correction done in the
Code.
1)
for Name in [Amar, Shveta, Parag]
if Name [0] = ‘s’:
print(Name)
2)
for Name in [Ramesh, Suraj, Priya]
if Name [0] = ‘S’:
print (Name)
Answers
Answered by
8
Answer:
Explanation:
1)
for Name in [Amar, Shveta, Parag] : #colon was missing
if Name [0] == ‘s’: #Indentation was not present
print(Name)
for Name in [Ramesh, Suraj, Priya] : #colon was missing
if Name [0] = ‘S’: #Indentaion was not present
print (Name)
Similar questions