Recap:
Just as in in Jeroo, code in python consists of functions (ie. print), statements ( print("argument")), loops, and conditionals. Anything enclosed in "" are called strings. Numbers in this language can be categorized as integers or floating and are expressions. As far as variables go and completing tasks, Jeroo is actually very similar to python, at least on the conceptual level. Some differences i really took note of during the lecture is that when assigning variables and so on, the right side is evaluated first and then stored as the variable toward the left of the equal sign. Though i don't know whether or not this is an important deal, it nonetheless was a linguistic nuance that stuck for some odd reason. Furthermore, apparently the tutorial also suggests that one not ought to confuse the equal sign as something which equivocates both sides of the statement. Am i slightly confuzzled. Why yes. Fortunately, i now have python on my computer which means i can practice...because, as the old saying goes, practice makes perfect.
Some basic numerical operations to remember:
| Operation | Symbol | Example |
|---|---|---|
| Power (exponentiation) | ** | 5 ** 2 == 25 |
| Multiplication | * | 2 * 3 == 6 |
| Division | / | 14 / 3 == 4.666666666666667 |
| Integer Division | // | 14 // 3 == 4 |
| Remainder (modulo) | % | 14 % 3 == 2 |
| Addition | + | 1 + 2 == 3 |
| Subtraction | - | 4 - 3 == 1 |
chapter 1 of "Non-Programmer's Tutorial for Python 3," down. Next up....break time. : )
No comments:
Post a Comment