NPRG065 Programming in Python Labs, Summer 2019

11 June 2019 - Exam

Assignment

Contact
David Čepelík <d@dcepelik.cz>
Schedule
Monday 12:20 SU2
Office hours
After class or scheduled individually via e-mail
Details
Course website, SIS

Requirements

Please refer to course website for information about course requirements. Please use ReCodEx to submit all homework.

Notes

Please provide feedback early. If you're unhappy about something or if you have any suggestions, please do let me know. I'll be willing to help.

20 May 2019

13 May 2019

6 May 2019

Still not feeling well, so everyone was working on the Tenth set of excercises on their own.

29 April 2019

I was sick, the session was held by Vojtěch Aschenbrenner. (Big thanks.)

22 April 2019

Holiday!

15 April 2019

8 April 2019

Some general notes:

1 April 2019

25 March 2019

Last time, we've seen a nice heapsort implementation. Since we were focusing on the Python program, we haven't discussed time complexity of the algorithm. It's useful to remember that heap construction takes either O(n) or O(nlog(n)) depending on implementation. (And our implementation constructed the heap in O(nlog(n)) time.)

Today, I'd like to share some tips for efficient (Python) programming:

Please send me your solution of the last assignment ("Create a simple scheduler ...") from the fifth set of assignments before next class:

This is not a hard requirement. But it's a chance for you to get some feedback and show that you're an awesome programmer :).

18 March 2019

Let's finish tasks from the last time: selection sort and heapsort as presented by volunteers. Thanks!

Individual work on the fourth set of assignments.

11 March 2019

Unfinished agenda from previous labs: permutations and binary tree drawing. How did it go? Questions?

Two solutions of the complete binary tree drawing problem were devised: first by V.N. which constructs a bitmap and another one which doesn't need a bitmap and instead manupulates lists (could be easily changed to manipulate strings).

Warm-up exercises:

Once ready, please try to solve third set of assignments individually. Ask if you need anything!

4 March 2019

Recap of basic UNIX knowledge: Warm-up exercises: As usual, you can work on the second set of assignments individually and ask any related questions.

25 February 2019

Unless you have already, please set-up a ReCodEx account and join the Programming in Python (Mon, 12:20, SU2) group.

The goal of the excercise is individual work on the assignments. I will usually do some talking to get you started.

Useful/interesting links:

Recommended vim configuration for Python development (put into .vimrc for vim or into .config/nvim/init.vim for nvim):

autocmd Filetype python setlocal tabstop=4
autocmd Filetype python setlocal softtabstop=4
autocmd Filetype python setlocal shiftwidth=4
autocmd Filetype python setlocal expandtab
	

Creating an executable Python script on Linux:

nano hello.py
# edit the file using nano
# don't forget to add the she-bang line (#!/usr/bin/env python3)
chmod u+x hello.py
./hello.py
Hello World!
	

Last change: Mon Apr 1 09:15:25 CEST 2019