CBSE Class 11 Computer Science
Question 32 of 80
Getting Started with Python — Question 9
Back to all questions 9
Question Which of the following codes is correct?
1.
print("Programming is fun")
print("Python")
print("Computer Science")
2.
print ("Programming is fun)
print("Python")
print("Computer Science)
3.
Print("Programming is fun")
print("Python")
print("Computer Science")
4.
Print("Programming is fun")
Print("Python")
Print("Computer Science")
print("Programming is fun")
print("Python")
print("Computer Science")
Reason — In Python, the print() function is written in lowercase (print) and strings must be enclosed in matching pairs of either single (') or double quotes ("). Therefore, the correct code would be :
print("Programming is fun")
print("Python")
print("Computer Science")