B2.1 Programming fundamentals - IB Diploma Class 11 Computer Science Notes, Diagrams and Solved Questions

The building blocks of every program in Python and Java: variables and constants, data types and typing, arithmetic, relational and logical operators, string manipulation, exception handling, and how to find and fix syntax, runtime and logic errors.

In this chapter

  • Variables, constants and assignment in Python and Java
  • Data types, casting, and static vs dynamic typing
  • Integer and real division, modulus, relational and logical operators
  • String length, indexing, substrings, searching, case and splitting
  • Handling exceptions with try, except/catch and finally
  • Syntax, runtime and logic errors, and debugging with prints, trace tables and breakpoints
  • Iteration 3: overflow, floating-point comparison, string algorithms and input validation