This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
python [2016-12-17 T 00:31] admin |
python [2017-03-03 T 17:14] (current) |
||
|---|---|---|---|
| Line 9: | Line 9: | ||
| ==== Some basics ==== | ==== Some basics ==== | ||
| * #is the comment operator | * #is the comment operator | ||
| + | |||
| + | === value types === | ||
| + | * int | ||
| + | * float | ||
| + | * (more on this another time) | ||
| + | |||
| + | === assign variables === | ||
| + | Can do simple variable subs with = | ||
| + | * >widht = 20 | ||
| + | * >height = 20 | ||
| + | * >width * height | ||
| + | * 400 | ||
| + | Also you can create multple assingments with , in both sides of = | ||
| + | * >a, b = 0, 1 | ||
| + | === Output text === | ||
| + | There are a lot of rules about printing text. Here are some basics. | ||
| + | * print is the most common command, and followed by (' | ||
| + | * > | ||
| + | * >how cool | ||
| + | * %%Quotes "" | ||
| + | * >'" | ||
| + | |||
| + | |||
| + | === Special Charactors === | ||
| + | When you want to indicate spaces, or chars that normally are used as an interpreter, | ||
| + | * >' | ||
| + | To not interpret \ as a line, put r before quotes | ||
| + | * >pint | ||
| + | |||
| + | |||