Aspire Faculty ID #14403 · Topic: COMPUTER SCIENCE INFORMATICS PRACTICES 2022 · Just now
COMPUTER SCIENCE INFORMATICS PRACTICES 2022

Considering the given statement in Python: Print("Hello world") 
What type of error will be generated?

Solution

In Python, function names are case-sensitive. The correct function is print(), not Print().
When you write Print("Hello world"), Python tries to find a variable or function named Print, which doesn’t exist — hence it raises a NameError.

Example Output:

NameError: name 'Print' is not defined

✔️ Key Point:
Always remember that Python is case-sensitive, so print() must be written in all lowercase.

Next 10 Questions — COMPUTER SCIENCE INFORMATICS PRACTICES 2022

Ascending by ID
Ask Your Question or Put Your Review.

loading...