ITP 115 Lecture Notes - Lecture 2: Camel Case, Letter Case, Dont

64 views3 pages

Document Summary

Variables: think: bucket that stores something, represents small piece of reserved memory, contents can vary, variables are the way label & access info (data) Take what"s on the right and put it into what"s on the left. 3 -1 2011 0: real numbers. Hi a 44 : boolean (has 2 possible values) Note: python is case-sensitive, so true is different from true. Variable naming guidelines: name can contain only numbers, letters, and underscores (no spaces, name cannot start w/a number. 1num is not ok (bc starts with number) Num 1 is not ok (bc of space: names are case-sensitive, choose descriptive names. Ex. scores instead of s: use camelcase (convention, not rule) Capital letter to indicate each new word (camelcase like bumps of camel) Ex. firstname lastname: variable names begin with lowercase letter (convention, not rule) Python keywords (don"t use these because they already have their own.

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