Test Index

Python Revision Tour Get it on Google PlayDownload on the App Store CBSE Board Videos

© examsnet.com
Question : 32 of 102
Marks: +1, -0
Identify the invalid Python statement out of the following options :
[CBSE 2025 Set 4]
Solution:  
Concept:
In a function call, positional arguments must come before keyword arguments such as sep= and end=.
Explanation:
(A) valid: prints A 10*
(B) invalid: the positional argument 10 comes after the keyword argument sep="*":
SyntaxError: positional argument follows keyword argument
(C) valid: prints A*10
(D) valid: string repetition, prints AAAAAAAAAA
Answer:
Option B (print("A",sep="*",10))
© examsnet.com
Advertisements
Go to Question: