Tuesday, January 5, 2016

Day 8

I jumped way ahead and tried Selenium today. It was great. I was quickly able to identity things that will help with work.

I am still going though the questions and excesizes on the automate the boring stuff website.

Sunday, January 3, 2016

Day 7

I was originally thinking that this would be
automate the boring stuff using python in 30 days... but then I thought, lets make it 15 days... but here we are on day 7 and honestly I think I am 20% though it.

Im doing this in my spare time, a minimum of 30 minutes a day, but sometimes, understanding things takes longer, or I go back and rewatch videos.

Today,  was my first successful coding, I was able to take a problem and create a solution ( a simple solution) but it was a great feeling to be able to do that.

Starting today, Im going to go though the questions on the website and follow along with the website a bit more than I have been doing.

I will likely copy and paste more info from the website as I move forward as well as information from Python.org and Stackoverflow

https://automatetheboringstuff.com/chapter0/


Doing these questions is HARD

there is also some homework with each one of them... this is really getting me going good.

but it takes time... I think I need to take it easy on the 30 day thing or it is going to stress me out.

Just focus on doing 30 minutes a day and I will be fine.

Saturday, January 2, 2016

Day 6

https://docs.python.org/2/library/

Functions use arguments

Print(variable) for example
In this example



  1. def spam():
  2.     eggs = 99
  3.     return eggs

  4. number = spam()
  5. print (number)


Line 6 needs the argument (number)  or it will never print 99, you will get an error.


Global and local scope. 

pythontutor.com/visualize.html


Change a global variable with a local scope variable 

  1. def spam():
  2.        global eggs
  3.        eggs = 'Hello'
  4.        print = (eggs)


  5. eggs = 42
  6. spam()
  7. print(eggs)

Try and Except



Left off on lecture 12

Friday, January 1, 2016

Day 5

global and local scope

I went back to lecture 8
I need to understand functions better. I want to make sure that I understand how they have a return and specifically understand this reddit thread that I created.

https://www.reddit.com/r/learnpython/comments/3z340l/i_am_very_new_can_someone_explain_why_this_doesnt/

Thursday, December 31, 2015

Day 4


these two programs give me different outputs, why? 


total = 0
for num in range (101):
   total = total + num
   print (total)


total = 0
for num in range (101):
   total = total + num
print (total)


for loop

this is not like a while loop



Range (start, end, step)


Standard library.
Math
Random, etc

import Statement

import module

import random

import sys

use pip to import third party modules

Wednesday, December 30, 2015

Day three Section 2

# this is a comment


Functions are like mini programs ... input() for example is a function, functions have arugments that is the () this is a function because python doesnt do the memory management... that is all handled by the language, python is written in C so  C is what does the memory management and python just knows input()

I can write my own functions.

int(), str(),float() convert values' data type


Flow control statements.




Boolean values - True, False need to be capitalized.


comparison vales
Operator Meaning
== Equal to NOT = which is assignment dont get these confused
!= Not equal to
< Less than
> Greater than
<= Less than or equal to
>= Great than or equal to


Int == str
False

Truthy Falsey
bool()




Boolean operators

and
or
not


Flow control statements
If, Else and Elif statements







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.