CSC108H5 Lecture 2: Notes

93 views2 pages
School
Course
Professor
897wjface and 39475 others unlocked
CSC108H5 Full Course Notes
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.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents