Which one of the following comments is syntactically incorrect:
# comment
x = 1 + 2 + 3 \ # Comment + 4 + 5
s= set (['foo','bar','baz']) #comment
d = {'a': 1, 'b': 2} # Comment
Answers
Answered by
1
Answer:
x = 1 + 2 + 3 \ # Comment + 4 + 5 is syntactically incorrect:
Answered by
0
x = 1 + 2 + 3 \ is syntactically incorrect
Explanation:
X=1+2+3 \
- This will give the error while compiling the program
Error:
- SyntaxError: unexpected EOF while parsing
⇒ s= set (['foo','bar','baz']) will not give the error while compiling the program
⇒ d = {'a': 1, 'b': 2} will not give the error while compiling the program
hence, x = 1 + 2 + 3 \ is syntactically incorrect
Similar questions
Psychology,
2 months ago
Physics,
2 months ago
Math,
2 months ago
Social Sciences,
4 months ago
Hindi,
4 months ago
Math,
10 months ago
Physics,
10 months ago