Lecture Notes on 23 Jan 2025 * Structure of Python * Write the Hello World program def main(): print ("Hello World!") main() * Characterset: ASCII / Unicode * Variables: - must begin with a letter or underscore - can be followed by zero or more letters, digits, and underscores - cannot be a reserved word * Types - int, float, str, bool * Simple assignment statements * Operators - arithmetic: + - * / // % ** - comparison: < <= > >= == != - boolean: not, and, or - bitwise: ~, &, |, ^ - shift: << >> * Conditionals: if-else, if-elif-else * Loops: while, for * Functions - built-in - libraries: math, random, sys - user defined * Lists: 1-D, 2-D * Tuples, Sets, Dictionaries * Simple Input / Output - console: input, print - file * Class