CBSE Class 11 Informatics Practices
Question 30 of 62
Getting Started with Python — Question 11
Back to all questions 11
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")