CMPT 120 Chapter Notes - Chapter 2: Exponentiation, Operand, Concatenation
meghan78 and 39786 others unlocked
29
CMPT 120 Full Course Notes
Verified Note
29 documents
Document Summary
Value belong to different types: 2 is an integer and hello! is a strong (contains string of letters) You can identify strings because they"re enclosed in quotation marks. If you don"t know what a type value is, interpreter can tell you. Numbers with a decimal point are a type called float (because they are represented with a floating-point) Anything in quotation marks is string, even integers. py inteprets commas as a separated sequence of integers, prints large numbers (1,000,000 in normal writing) with spaces in between. An assignment statement creates new variables and gives them values. To display value of variable use the print function. Type of a variable is type of value it gives. Variables have meaningful names (so can keep track of them) Names can be long, contain letters,_, and #s but have to begin with a letter.