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
2
a) 1 2 3 4
b) Syntax Error.
Answered by
0
OUTPUT :
Explanation:
- The a option code will display the output as 1234.
- 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:
- In the second print statement, then p will be written in a capital letter which is not correct.
- In the third print statement, there is no parenthesis, which gives the syntax error.
- 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