Tuesday, December 29, 2015

Day two

Section:1 Python Basics
Quiz 1: just a check in
https://automatetheboringstuff.com/chapter1/
Lecture 2: Basic Terminology
Operator
Operation
Example
Evaluates to...
**
Exponent
2 ** 3
8
%
Modulus/remainder
22 % 8
6
//
Integer division/floored quotient
22 // 8
2
/
Division
22 / 8
2.75
*
Multiplication
3 * 5
15
-
Subtraction
5 - 2
3
+
Addition
2 + 2
4


Lecture 3 Writing our first program.




Lecture 3 really slowed me down.




This line

  • print('You will be ' + str(int(myAge) + 1) + ' in a year.')



My age is a string, then it is turned into an interger... then one is added, then it is turned back into a string to concatenate to be 'you will be (myage +1) in a year.
Looking forward to day three.

No comments:

Post a Comment