CMPT 120 Chapter Notes - Chapter 2: Exponentiation, Operand, Concatenation

55 views4 pages
meghan78 and 39786 others unlocked
CMPT 120 Full Course Notes
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.

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