Computer Science, asked by mamtapundhir78, 10 months ago

Let's Practice
Write the output for the following codes.
(a)
print(1,2,3,4)
(b)
print ("Hello World!")
Print ("Hello World!")
print "Hello World"
print (Hello World)​

Answers

Answered by Anonymous
2

a) 1 2 3 4

b) Syntax Error.

Answered by AskewTronics
0

OUTPUT :

Explanation:

  1. The a option code will display the output as 1234.
  2. The b option code will gives the syntax error.

Detailed Explanation:

  • The above-defined question code is written in the python language, in which the option will print 1234 because the print function is used to display the message.
  • But the option b states the syntax error because there is three syntax error in option b which are as follows:
  1. In the second print statement, then p will be written in a capital letter which is not correct.
  2. In the third print statement, there is no parenthesis, which gives the syntax error.
  3. In the last print statement, there is no inverted comma, which also gives an error.

Learn more:

  • Python : https://brainly.in/question/14689905
Similar questions