Learning Circle : python #2 - ex8, ex9
This commit is contained in:
parent
72ed0f808e
commit
48671bd220
|
@ -1,10 +1,24 @@
|
||||||
|
* 2020-05-20
|
||||||
|
*** Python #2:
|
||||||
|
**** TODO Lecture content
|
||||||
|
- Read thoroughly & do exercises 8 to 14
|
||||||
|
- Focus on understanding
|
||||||
|
- You don't have to type everything
|
||||||
|
- But you should ensure you understand everything
|
||||||
|
- Commit all source code to ~/ungleich-learning-circle/USERNAME/python-the-hard-way
|
||||||
|
- Write down notes / what you learned in the *python.org* file
|
||||||
|
- Notify your fellow students when you solved something
|
||||||
|
- "I just solved exercise 4!"
|
||||||
|
**** Lecture material
|
||||||
|
- Available on https://cloud.ungleich.ch/s/435FyfrQyEq6oF3
|
||||||
* 2020-05-15
|
* 2020-05-15
|
||||||
*** Python #1:
|
*** Python #1:
|
||||||
**** Lecture notes
|
**** Lecture notes
|
||||||
- Ensure that you have python3 (at least 3.6) installed
|
- Ensure that you have python3 (at least 3.6) installed
|
||||||
- Use emacs for editing source files
|
- Use emacs for editing source files
|
||||||
- Commit all source code to ~/ungleich-learning-circle/USERNAME/python-the-hard-way
|
- Commit all source code to ~/ungleich-learning-circle/USERNAME/python-the-hard-way
|
||||||
**** Lecture content
|
**** DONE Lecture content
|
||||||
|
CLOSED: [2020-05-19 화 23:47]
|
||||||
- Read thoroughly & do exercise 0 to 7
|
- Read thoroughly & do exercise 0 to 7
|
||||||
- Commit your source code in git
|
- Commit your source code in git
|
||||||
- Commit every time you have a task done
|
- Commit every time you have a task done
|
||||||
|
@ -13,7 +27,7 @@
|
||||||
- Notify your fellow students when you solved something
|
- Notify your fellow students when you solved something
|
||||||
- Ask help to other students when you are stuck (but try to solve
|
- Ask help to other students when you are stuck (but try to solve
|
||||||
on your own before)
|
on your own before)
|
||||||
**** TODO Lecture material
|
**** Lecture material
|
||||||
- Available on https://cloud.ungleich.ch/s/435FyfrQyEq6oF3
|
- Available on https://cloud.ungleich.ch/s/435FyfrQyEq6oF3
|
||||||
* 2020-05-15
|
* 2020-05-15
|
||||||
*** cdist #6: Glueing it together
|
*** cdist #6: Glueing it together
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
formatter = "{} {} {} {}"
|
||||||
|
|
||||||
|
print(formatter.format(1, 2, 3, 4))
|
||||||
|
print(formatter.format("one", "two", "three", "four"))
|
||||||
|
print(formatter.format(True, False, False, True))
|
||||||
|
print(formatter.format(formatter, formatter, formatter, formatter))
|
||||||
|
print(formatter.format(
|
||||||
|
"Try your",
|
||||||
|
"Own text here",
|
||||||
|
"Maybe a poem",
|
||||||
|
"Or a song about fear"
|
||||||
|
))
|
|
@ -0,0 +1,14 @@
|
||||||
|
# Here's some new strange stuff, remember type it exactly.
|
||||||
|
|
||||||
|
days = "Mon Tue Wed Thu Fri Sat Sun" # define a string
|
||||||
|
months = "Jan\nFeb\nMar\nApr\nMay\nJun\nJul\nAug" # define a string
|
||||||
|
|
||||||
|
print("Here are the days: ", days) # print the days in a week
|
||||||
|
print("Here are the months: ", months) # print the months in a year with new lines
|
||||||
|
|
||||||
|
print("""
|
||||||
|
There's something going on here.
|
||||||
|
With the three double-quotes.
|
||||||
|
We'll be able to type as much as we like.
|
||||||
|
Even 4 lines if we want, or 5, or 6.
|
||||||
|
""") # print multiple lines with three double-quotes
|
|
@ -1,3 +1,12 @@
|
||||||
|
* 2020-05-20
|
||||||
|
** note
|
||||||
|
- ex8.py
|
||||||
|
- none
|
||||||
|
- ex9.py
|
||||||
|
- none
|
||||||
|
- ex10.py
|
||||||
|
-
|
||||||
|
|
||||||
* 2020-05-18
|
* 2020-05-18
|
||||||
** note
|
** note
|
||||||
- ex1.py
|
- ex1.py
|
||||||
|
|
Loading…
Reference in New Issue