CBSE Class 11 Computer Science
Question 73 of 91
String Manipulation — Question 18
Back to all questions 18
Question Question 8d
Find the errors. Find the line numbers causing errors.
- S = "PURA VIDA"
- S1 = S[: 5]
- S2 = S[5 :]
- S3 = S1 * S2
- S4 = S2 + '3'
- S5 = S1 + 3
Answer
The errors are in line 4 and line 6. Two strings cannot be multiplied. A string and an integer cannot be added.