EDAF75: Database Technology – Python
Python for EDAF75
You don't have to learn Python to take this course, Java will be an option (for lab 3 and the project). But there is no doubt that many things will be much, much easier if you know some Python, so I'd recommend that you try it out if you have some time 'to spare' – you will get most (if not all) of that time back, during lab 3 and the project.
Here is a good 39 minutes introduction to Python. In this course, you will most likely never have to define your own Python classes, so you can skip from 27:40 to 35:15. Unfortunately the video uses a somewhat outdated way of formating strings – around 16:17 the slide says:
presidents = [ ("George Washington", 1789), ("John Adams", 1797), ("Thomas Jefferson", 1801), ("James Madison", 1809) ] for pres, year in presidents: print("In {1}, {0} took office".format(pres, year))
This is still valid Python3 code, but since the video was published, Python 3.6 introduced a much simpler way of writing this (it's called literal string interpolation):
presidents = [ ("George Washington", 1789), ("John Adams", 1797), ("Thomas Jefferson", 1801), ("James Madison", 1809) ] for pres, year in presidents: print(f"In {year}, {pres} took office")
Around 25:10 the video discusses other ways of formating strings, but they've also been rendered obsolete by the introduction of literal string interpolation in Python 3.6 (so, make sure you use a Python version which is at least 3.6, and don't even think about using Python 2.7, which is no longer being maintained – personally I'm at 3.12).
If you have any question about the video, or about Python, feel free to ask at a QA-session!