CBSE · 083Class XII · 2025Section B2 marks

Question 23

4 March 2025 · Computer Science (083)

Write one example of each of the following in Python : (i) Syntax Error (ii) Implicit Type Conversion

Answer

(i) print(2 ; 5) # Invalid syntax (semicolon) (ii) 3 + 4.5 # Int converts to float automatically

Explanation

Syntax errors violate language grammar. Implicit conversion automatically promotes types (e.g., int to float) to prevent data loss.