Variables and data types

    C++                                         Python

    int i, j;
    float x, y, z, sum;

    printf("Hello, world");                     print 'Hello world'

    int i;
    int sum = 0, counter = 1;                   sum = 0
                                                counter = 1

    float x, y = 1, z;                          y = 1.0

    double a, b = 0, c = 42;                    b = 0.0
                                                c = 42.0

    i = 1;                                      i = 1
    sum = sum + i;                              sum = sum + i
    sum += i;                                   sum += i

    counter = counter + 1;                      counter = counter + 1
    counter += 1;                               counter += 1
    counter++;
    counter--;

    a = b + c;                                  a = b + c

    x = z = y;                                  z = y
                                                x = z

    next_term = sqrt(x);                        next term = math.sqrt(x)