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/2018sp
Lecture 1: Introduction, Types & Expressions (Chapter 1, - - PowerPoint PPT Presentation
http://www.cs.cornell.edu/courses/cs1110/2018sp 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/2018sp
https://piazza.com/class/jckqwmqflaz6i?cid=10
http://www.cs.cornell.edu/courses/cs1110/2018sp/resources/alternatives.php
http://www.cs.cornell.edu/courses/cs1110/2018sp/resources/aew.php
2
HandoutSlide
http://www.economist.com/blogs/babbage/2010/08/computing_schools
3
4
5
6
7
8 http://www.catonmat.net/blog/front-end-vs-back-end-comic/
9
10
11
12
http://www.cs.cornell.edu/courses/cs1110/2018sp
13
separately
consultants
Lab has no printouts, etc.
AWB93, LJL2, cs1110-prof, or with [CS1110] in the subject line.
14
HandoutSlide
15
HandoutSlide Please, no cell phones during lecture (except for during a Clicker question)
16
HandoutSlide
17
18
HandoutSlide sash means 2nd ed
http://www.cs.cornell.edu/courses/cs1110 /2018sp/materials/python.php
19
Everything is on website!
Check it regularly: www.cs.cornell.edu/ courses/cs1110/2018sp/ HandoutSlide
evaluate expressions
20
>>> terminal time >>>
This class uses Python 3
21
42 3.0 * 108 0.00001 “apple” “Tower Road” True False 14850 “awb93”
22
HandoutSlide Literal (evaluates to self) An expression with four literals and some operators
23
HandoutSlide
24
>>> terminal time >>>
a float literal (e.g., 2.0)
an int literal (e.g., 2)
25
A second kind
HandoutSlide
26
mantissa exponent
>>> terminal time >>>
27
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
28
"=" means something else! HandoutSlide
29
30
HandoutSlide
>>> terminal time >>>