CSC108H5 Lecture 2: Notes
897wjface and 39475 others unlocked
12
CSC108H5 Full Course Notes
Verified Note
12 documents
Document Summary
Unambiguous: instructions are precise and there is no guesswork. Programming is how we tell the computer what algorithm it should carry out. + (addition) e. g. 11+56 at the shell gives 67. // (division outputting just the quotient-integer division) e. g. 10/2 at the shell gives 5. 0. % (remainder, aka modulus, mod) e. g. 9%3 at the shell gives 0. E. g. 10%3 at the shell gives 1 use parentheses to change precedence e. g. 4 + 5 * 3 at the shell gives 19. E. g. (4 + 5) * 3 at the shell gives 27. Decimal values= oating point values whole numbers= integers. Value of 1 and 1. 0 is not the same. 42 it will give you the output of what you put in front of your value or argument. Variables in programming are a lot like the variable in math except you can change the variables in programming. Def, int, string, oat cannot be used as variable names.