itch.io is community of indie game creators and players

Devlogs

Week 2

Programming for Animation Blog
A downloadable project

This week we had an intro to python basics and variables.

Syntax Errors

If a line of code has a mistake the compiler will output a syntax error.

In the example:

print("Hello World!)

The compiler would output a syntax error as the string is not wrapped with two quote marks.

Commenting

A comment in python is determined by the # symbol.

Anything after the # is ignored by the compiler. This is useful to make notes about what code does and to temporarily disable code for debugging purposes

Equal Operators

In python a single equal sign is used to assign the value on the right to a variable (on the left).

Conversely, the double equal is used to compare two values. If they are equal the output is true or 1.

Leave a comment