ECS 10 Lecture Notes - Lecture 2: Control Character

59 views3 pages

Document Summary

## convert canadian dollars to equivalent in us dollars exchange_rate = 0. 80064 canadian_dollars = 1000. 00 us_dollars = canadian_dollars * exchange_rate print (us_dollars) Variable: name for a value where a data is stored and are associated with numeric addresses. (ex: canadian_dollars, us_dollars) Data values are stored in memory locations - more than one location may be used if the data is large. Each memory location stores one byte (or 8 bits) of data. Each bit is a 0 or a 1. Assignment statement: associates a value with a variable. An identifier followed by the assignment operator (=) followed by an expression. Note that = is no longer a test for equality. Expressions: combination of one or more operators and operands that usually performs a calculation. The calculations don"t have to be arithmetic in nature, but they often are. 3 lower operator operation unary plus and minus mult, divide, remainder, int divide add, subtract.

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