Munch Lab

Applied programming 2015 week three


Your should read/complete the exercises 27- 38 in Learn Python the Hard Way before the Thursday lecture.


At the Thursday lecture I will talk about how we can control the series of statements that are evaluated by our program. At the Tuesday lecture we will talk about how we can make Python iterate over a long sequence of things – like a DNA sequence.

Exercises  (TØ)

I will make an exercise for your about Files and Functions that will appear as a link on the main course page in the table showing the course outline.

Mandatory assignment

Make a function called celcius2fahrenheit that takes one argument (a float). The function should return the corresponding degrees in fahrenheit so you can use it like this:

celcius = 37.8
fahrenheit = celcius2fahrenheit(celcius)

Make two versions of the function: one long one where the task is split into many statements; and a short one that you try to make as short as possible (maybe only holding a single statment).

Send the file with python code to Dan no later than Tuesday (17/11) at 12.00 (not 24.00).

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: