CAS CS 111 Lecture Notes - Lecture 3: Concatenation, String Literal, Control Order
CAS CS 111 verified notes
3/38View all
Document Summary
The following prompt indicates that the shell is waiting for you to type something: % modulus: gives the remainder of a division. The operators follow the standard order of of operations. You can use parentheses to force a different order. Different kinds of values are stored and manipulated differently. There are really two sets of numeric operators: If at least one of the operands is a float, the result is a float. If both of the operands are ints, the result is an int. The / operator always produces a float result. There is a separate // operator for integer division. Integer division discards any fractional part of the result: Variables allow us to store a value for later use: When an expression includes variables, they are first replaced with their current value. A statement is a command that carries out an action. Assignment statements store a value in a variable.