Lecture 1: Introduction, Types & Expressions
(Chapter 1, Section 2.6) CS 1110 Introduction to Computing Using Python
[E. Andersen, A. Bracy, D. Gries, L. Lee, S. Marschner, and W. White]
http://www.cs.cornell.edu/courses/cs1110/2019sp
Lecture 1: Introduction, Types & Expressions (Chapter 1, - - PowerPoint PPT Presentation
http://www.cs.cornell.edu/courses/cs1110/2019sp Lecture 1: Introduction, Types & Expressions (Chapter 1, Section 2.6) CS 1110 Introduction to Computing Using Python [E. Andersen, A. Bracy, D. Gries, L. Lee, S. Marschner, and W. White] CS
[E. Andersen, A. Bracy, D. Gries, L. Lee, S. Marschner, and W. White]
http://www.cs.cornell.edu/courses/cs1110/2019sp
http://www.cs.cornell.edu/courses/cs1110/2019sp/alternatives.html
http://www.cs.cornell.edu/courses/cs1110/2019sp/aew.html
2
HandoutSlide
http://www.economist.com/blogs/babbage/2010/08/computing_schools
3
4
5
6
7
8
9
10
http://www.cs.cornell.edu/courses/cs1110/2019sp/
11
consultants
Nobody at office hours; Lab has no printouts, etc.
12
HandoutSlide
13
HandoutSlide
nope
front
14
HandoutSlide
15
16
HandoutSlide sash means 2nd ed
17
Lots of information on the website!
Read it thoroughly: www.cs.cornell.edu/ courses/cs1110/2019sp/ HandoutSlide
evaluate expressions
18
>>> terminal time >>>
This class uses Python 3
19
42 3.0 * 108 0.00001 “apple” “Tower Road” True False 14850 “awb93”
20
HandoutSlide Literal (evaluates to self) An expression with four literals and some operators
21
HandoutSlide
22
>>> terminal time >>>
a float literal (e.g., 2.0)
an int literal (e.g., 2)
23
A second kind
HandoutSlide
24
mantissa exponent
>>> terminal time >>>
25
multiply to power of division (technically a float
HandoutSlide integer division
>>> terminal time >>>
i < j i <= j i >= j i > j
i == j i != j
26
"=" means something else! HandoutSlide
27
28
HandoutSlide
>>> terminal time >>>