Learning Circle : python #1 - ex6

This commit is contained in:
youngjin.han 2020-05-19 00:34:11 +09:00
parent 2531ef78c5
commit 070ef33f38
3 changed files with 42 additions and 1 deletions

View file

@ -1,4 +1,21 @@
* 2020-05-15 * 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 *** cdist #6: Glueing it together
**** Lecture content **** Lecture content
***** Objective ***** Objective

View file

@ -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

View file

@ -12,4 +12,5 @@
- none - none
- ex6.py - ex6.py
- + is to add two string array. - + is to add two string array.
- ex7.py
-