COMPSCI 1MD3 Lecture Notes - Lecture 2: Information Hiding, Code Reuse, Infix Notation

28 views12 pages

Document Summary

5: type things into the shell and responds automatically, an interactive language, usually we write a program and load it in the shell to execute, color scheme to highlight the syntax, uses basic algebra: -, +, /, * 3/2 could be 1. 5 which is an integer, 3/2 is real (opposite) 14//3 is the quotient when 14 is divided by 3 and 14%3 is the remainder. // is for integer division: % is module operation, looking for the remainder. ** is for exponentials: abs is for absolute value-uniary operation: takes the value and removes the sign-function, min() is for the minimum value-function, max() is for the maximum value-function. Java, python, c, c+: pascal uses =: for assignment, equality , ambiguous airthmetics, 2 * 3 + 1 is not actually 7, abstract: a (circle) b (triangle) c, associatinty, assigning an order to mathematical expressions, e. x. 2**3**4: order matters, right associative operation a-(b-c)

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