Skip to content
Pooja Bhatia Classes Hari Nagar
  • We teach following classes
    • Class 12
    • Class 11
    • Class 10
    • Class 9
  • Sumita Arora IP/CS Solutions
  • Jobs/Internship
Pooja Bhatia Classes Hari Nagar

sa 11 cs chapter 7

11. Following expression does not report an error even if it has a sub-expression with ‘divide by zero’ problem :

sa 11 cs chapter 7, sa 11 ip chapter 4, Uncategorized / PythonCSIP CS IP

What changes can you make to above expression so that Python reports this error ?

11. Following expression does not report an error even if it has a sub-expression with ‘divide by zero’ problem : Read More »

13. Given a string s = “12345”. Can you write an expression that gives sum of all the digits shown inside the string s i.e., the program should be able to produce the result as 15 (1 + 2 + 3 + 4 + 5). [Hint. Uses indexes and convert to integer]

sa 11 cs chapter 7, sa 11 ip chapter 4, Uncategorized / PythonCSIP CS IP

# Output s = “12345” ans = sum(int(s[i]) for i in range(5)) print(ans)  

13. Given a string s = “12345”. Can you write an expression that gives sum of all the digits shown inside the string s i.e., the program should be able to produce the result as 15 (1 + 2 + 3 + 4 + 5). [Hint. Uses indexes and convert to integer] Read More »

Post pagination
← Previous 1 … 8 9 10 … 41 Next →
  • We teach following classes
    • Class 12
    • Class 11
    • Class 10
    • Class 9
  • Sumita Arora IP/CS Solutions
  • Jobs/Internship
  • We teach following classes
  • Sumita Arora IP/CS Solutions
  • Jobs/Internship

Copyright © 2025 Pooja Bhatia Classes Hari Nagar | Powered by Pooja Bhatia Classes Hari Nagar.