Computer Science, asked by dhusnyraj, 4 months ago

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 Likhithkumar155
1

Answer:

x = 1 + 2 + 3 \ # Comment + 4 + 5 is syntactically incorrect: 

Answered by mindfulmaisel
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