SolveIt is under development
SolveItNCERT · CBSE · NEET
✓ Board-verified
Computer Science · 2026 · 3 marks

CBSE 2026 · Central · Set 4 · Q29

(a) Write a Python function that counts and returns the number of digits appearing in the text file "Space.txt". For example, if the file contains:…

Write a Python function that counts and returns the number of digits appearing in the text file "Space.txt". For example, if the file contains : Space exploration has unlocked incredible advancements in technology and science. Since the first moon landing in $\displaystyle 1969$, space agencies have sent probes to Mars, Jupiter and beyond. The ISS, orbiting Earth at about $\displaystyle 400$ km, serves as a hub for research. With missions planned for $\displaystyle 2030$, humanity's cosmic journey continues! Then the function should return 11.
ShareWhatsAppTelegram

CBSE Class 12 Computer Science past-paper question from the 2026 board exam, with the answer as CBSE’s own marking scheme gives it. Where our answers come from.