diff --git a/youngjin.han/learning-node02-2020.org b/youngjin.han/learning-node02-2020.org index 40443ae..ed2ab64 100644 --- a/youngjin.han/learning-node02-2020.org +++ b/youngjin.han/learning-node02-2020.org @@ -1,4 +1,21 @@ * 2020-05-15 +*** Python #1: +**** Lecture notes + - Ensure that you have python3 (at least 3.6) installed + - Use emacs for editing source files + - Commit all source code to ~/ungleich-learning-circle/USERNAME/python-the-hard-way +**** Lecture content + - Read thoroughly & do exercise 0 to 7 + - Commit your source code in git + - Commit every time you have a task done + - Make a new commit in git each time you finish (part of) a task + - Do all exercises + - Notify your fellow students when you solved something + - Ask help to other students when you are stuck (but try to solve + on your own before) +**** TODO Lecture material + - Available on https://cloud.ungleich.ch/s/435FyfrQyEq6oF3 +* 2020-05-15 *** cdist #6: Glueing it together **** Lecture content ***** Objective diff --git a/youngjin.han/python-the-hard-way/ex6.py b/youngjin.han/python-the-hard-way/ex6.py new file mode 100644 index 0000000..d086426 --- /dev/null +++ b/youngjin.han/python-the-hard-way/ex6.py @@ -0,0 +1,23 @@ +types_of_people = 10 # define a value +x = f"There are {types_of_people} types of people." # define a string with the value "types_of_people" + +binary = "binary" # define a string +do_not = "don't" # define a string +y = f"Those who know {binary} and those who {do_not}." # define a string with two string array + +print(x) # print "There are 10 types of people." +print(y) # print "Those who know binary and those who don't." + +print(f"I said: {x}") # print "I said: There are 10 types of people." +print(f"I also said: '{y}'") # print "I also said: 'Those who know binary and those who don't.'" + +hilarious = False # define a value + +joke_evaluation = "Isn't that joke so funny?! {}" # define a string + +print(joke_evaluation.format(hilarious)) # print some format string + +w = "This is the left side of..." # define a value +e = "a string with a right side." # define a value + +print(w + e) # print a diff --git a/youngjin.han/python.org b/youngjin.han/python.org index 8e5b4ce..8f36e35 100644 --- a/youngjin.han/python.org +++ b/youngjin.han/python.org @@ -12,4 +12,5 @@ - none - ex6.py - + is to add two string array. - + - ex7.py + -