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

BE A

23. int(‘a’) produces error but following expression having int(‘a’) in it, does not return error. Why ? len(‘fl’) + 2 or int(‘fl’)

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

This does not return an error because ‘or’ operator checks second operand only when the first operand is False and here len(‘fl’)+2 is True. So the second operand i.e. int(‘fl’) is not checked.

23. int(‘a’) produces error but following expression having int(‘a’) in it, does not return error. Why ? len(‘fl’) + 2 or int(‘fl’) Read More »

22. int(‘a’) produces error. Why ?

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

int(‘a’) produces an error because ‘a’ can not be converted to an integer and is an invalid literal.

22. int(‘a’) produces error. Why ? Read More »

Post pagination
← Previous 1 2 3 4 … 25 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.