Ex, Fri 23-10-15
Discuss how to model things in the “real world” by objects. In particular, discuss how to model the objects that are relevant for the second part of the fractal and the second part of the DNA project. Come up with possible class diagrams in small groups and discuss them with everyone. Try to learn about design choices by comparing the differences in them
Lab, Mon 19-10-15
You can pick up your printed assignments at this class or in my letter box afterwards. They will remain there until the next assignment is due.
Ex, Fri 09-10-15
We will discuss some of these exercises:
Lab, Mon 05-10-15
For the assignment:
Place a printed version in my letter box at IMADA just outside the Vector room.
Remember, even though something doesn’t quite work in your implementation, don’t lose hope. Hand it in anyway and make sure to document what doesn’t work.
Lab, Mon 28-09-15
Ex, Fri 25-09-15
- Not started yet
- Started but stuck
- Started and progressing nicely
Lab, Mon 21-09-15
Lab, Mon 14-09-15
Ex, Fri 11-09-15
1 2 3 4 5 def print_n(s, n): if n <= 0: return print s print_n(s, n-1)
Recursion: A function that calls itself.
Lab, Mon 07-09-15
If you haven’t already, go ahead and do the tutorial from Lab, Thu 03-09-15.
- 1.2-4. We already covered most of this in Lab, Thu 03-09-15.
- 2.1 and 2.2-3. (2.4 is no where to be found.)
Then, exercise from weekly note:
Write a small program that interacts with the user by e.g. asking for the user’s name, then welcoming the user etc. Use your creativity to create an interesting dialogue. Look up the functions
input()in the library reference to handle user input
Now it gets interesting! First, install swampy. Go to the bottom of this page to find a guide.
Some solutions: 3.3.
Lab, Thu 03-09-15
Peter wants you to take a look at the Python documentation. Note that we are using Python 2.7 and not 3.
Specifically, you should glance through:
Next, launch Python and start working on the Python tutorial.
Installing Python, pip and swampy
First, we install Python and
Windows and Mac OSX:
Go to python.org. In the menubar, hover your mouse over “Downloads” and choose “Python 2.7.10”.
Install as normally.
pip will also be installed.
Open a terminal and write
sudo apt-get install python python-pip
Next, install swampy using pip.
Open Command Prompt by searching for
cmd in the Windows search menu. In
You are now in the correct folder to execute
Open a terminal/cmd if you haven’t already and write
pip install swampy
If using Linux (and possibly Mac OSX) and the above command downloads something, but then fails, try
sudo pip install swampy
You will be prompted for your password.