Agd111-3.doc - CPSC111 Introduction to Computation TODO...

This preview shows page 1 - 2 out of 2 pages.

CPSC111 - Introduction to Computation TODO [ ] Read Unit 3 – Control Structures AGENDA 3 Variable Names Chpt. 2 Assignment Chpt. 2 Expressions Chpt. 2 Operators & Operands Chpt. 2 Comments Chpt. 2 NOTES [1] Variable Names - Variable names can contain both letters & numbers - But variable names must begin with a letter - In Python, variable names are case sensitive (age is different from Age, AGE, AGe) - Underscore may be used in variable names (and is often used to separate words) Good Variable Name Examples Bad Variable Name Examples x 3xyz top_position more$ Version1 while HOUSE Big+thing [2] Assignment Statements are represented with the = symbol (equal) - used to move data into a variable - assignment statements produce no output (to the screen) - sometimes the assignment symbol is called an operator (assignment operator) - the ‘basic’ assignment statement has a variable on the left (the target) and a value (or variable) on the right

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture