ungleich-learning-circle/kjg/python.org

161 lines
3.3 KiB
Org Mode
Raw Permalink Normal View History

2020-05-18 14:35:46 +00:00
* learning python
2020-05-18 13:41:27 +00:00
*** Python #1:
**** ex0
**** ex1
>>> print("Hello World!")
... print("Hello Again")
... print("I like typing this.")
... print("This is fun.")
... print('Yay! Printing.')
... print("I'd much rather you 'not'.")
... print('I "said" do not touch this.')
Hello World!
Hello Again
I like typing this.
This is fun.
Yay! Printing.
I'd much rather you 'not'.
I "said" do not touch this.
2020-05-18 13:46:09 +00:00
**** ex2
I could have code like this.
This will run.
2020-05-18 13:55:52 +00:00
**** ex3
I will now count my chickens :
Hens 30.0
Roosters 97
Now I will count the eggs :
6.75
Is it true that 3 + 2 < 5 - 7?
False
What is 3 + 2? 5
What is 5 - 7? -2
Oh, that;s why it's Fasle.
How about some more.
Is it greater? True
Is it greater or equal? True
Is it less or equal? False
2020-05-18 14:01:21 +00:00
**** ex4
There are 100 cars available.
There are only 30 drivers available.
There will be 70 empty cars today.
We can transport 120.0 people today.
We have 90 to carpool today.
We need to put about 3.0 in each car.
2020-05-18 14:17:12 +00:00
**** ex5
Let's talk about Zed A. Shaw.
He's 74 inches tall.
He's 180 pounds heavy.
Actually that's not too heavy.
He's got Blue eyes and Brown hair.
His teeth are usually White depending on the coffee.
If I add 35, 74, and 180 I get 289.
2020-05-18 14:25:54 +00:00
**** ex6
There are 10 types of people.
Those who know binary and those who don't.
I said: There are 10 types of people.
I also said: 'Those who know binary and those who don't.'
Isn't that joke so funny?! False
This is the left side of...a string with a right side.
2020-05-18 14:35:46 +00:00
**** ex7
Mary had a little lamb.
Its fleece was white as snow.
And everywhere that Mary went.
..........
Cheese Burger
2020-05-20 12:16:04 +00:00
*** Python #2:
**** ex8
learn about a more complicated formatting of a string. {}
2020-05-20 12:31:00 +00:00
**** ex9
how to print for multiline or nextline
2020-05-20 12:46:08 +00:00
**** ex10
how to use \ (using special chracter)
2020-05-20 12:55:04 +00:00
**** ex11
how to use key input
2020-05-20 13:12:47 +00:00
**** ex12
how to use key input with print
2020-05-20 13:37:15 +00:00
**** ex13
how to use an argument when you run script
2020-05-20 13:52:18 +00:00
**** ex14
how to use an argument with input
2020-05-22 12:19:18 +00:00
*** Python #3:
**** ex15
How to use read function from file
2020-05-22 12:39:59 +00:00
**** ex16
2020-05-22 12:54:30 +00:00
How to write file
**** ex17
How to copy file
2020-05-22 13:08:40 +00:00
**** ex18
How to use function
2020-05-22 13:32:42 +00:00
**** ex19
How to use function and variables
2020-05-22 13:49:51 +00:00
**** ex20
How to use function with file
2020-05-22 14:14:40 +00:00
**** ex21
How to use fucntion with return
2020-05-22 14:33:46 +00:00
**** ex22
2020-05-22 14:43:18 +00:00
repeat from ex1 to ex21
" # () ' + . < ? , = / % - * {} \n \t
open read close truncate def return print
2020-05-29 12:33:13 +00:00
*** Python #4:
2020-05-25 14:05:21 +00:00
**** ex23
How to use encode and decode
2020-05-25 14:17:06 +00:00
**** ex24
practice function and print
2020-05-25 14:32:59 +00:00
**** ex25
practice import function
2020-05-25 14:57:31 +00:00
**** ex26
practice debug code
2020-05-29 12:33:13 +00:00
*** Python #5:
2020-05-27 12:28:05 +00:00
**** ex27
How to use True and Flase
**** ex28
How to use Boolean
2020-05-27 12:38:55 +00:00
**** ex29
How to use if-statement
2020-05-27 12:52:04 +00:00
**** ex30
How to use if-else
2020-05-27 13:30:01 +00:00
**** ex31
How to use if, elif
2020-05-29 12:33:13 +00:00
*** Python #6
**** ex32
How to use for-loop
2020-05-29 14:24:20 +00:00
append, insert, extend, copy, remove, pop, clear, count, index, reverse, sort
2020-05-29 12:54:51 +00:00
**** ex33
How to use while-loop
2020-05-29 13:11:07 +00:00
**** ex34
How to use Accessing Elements of Lists
2020-05-29 13:36:18 +00:00
**** ex35
practice function, while, if
2020-05-29 14:24:20 +00:00
**** ex36
some rules of if, loop and tips for debugging
*** Python applying learnings from 1..6
create calc.py
2020-06-08 13:00:57 +00:00
*** Python #7
**** ex37
analysis sample codes
2020-06-08 13:29:05 +00:00
**** ex38
append list
2020-06-08 14:16:29 +00:00
**** ex39
How to use dictionary
2020-06-10 13:37:13 +00:00
*** Python #8
**** ex40
How to use class
2020-06-10 14:35:09 +00:00
**** ex41
practice class
2020-06-17 13:48:58 +00:00
*** Python #9
2020-06-12 13:34:25 +00:00
**** ex42
review class and object
2020-06-17 13:48:58 +00:00
*** Python #10
**** ex43
Analysis and Design object
*** Python #11
**** ex44
difference with inheritance and compositon
2020-06-26 13:54:05 +00:00
*** Python #12
create game