Skip to content

s2135982/OOSA-code-public

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Public code for the OOSA course.

There is a separate directory for each week's work. As we progress, suggested answers will be uploaded.

Foundations

The foundations folder contains some warm up exercises to transition on to the course. There are two folders within:

  • basic_features
  • iterating

The basic_features folder contains a set of scripts introducing the basic Python features (data types, loops, plotting etc.). Other than 06_objects.py, which will be covered in week 2, these should already be familar to you and are included here for revision.

The iterating directory contains some exercises to practice using loops and work up to moving around a raster dataset.

Week 1

Week 1 covers:

Aspects

  • Github version control and code repository
  • Computer basics
  • Revision of loops and file I/O

Algorithm

  • Introduction to algorithm design: Finding minima and sorting

fileIO

Contains two scripts to demonstrate reading from a text file and writing to a text file. The data folder contains the data for the file reading example.

data

Contains a text file with some sample data to practice reading with the fileIO code.

sort

Contains an example solution for a simple sort. Note that there are multiple sort solutions, such as bubble sort, and then many more complex and efficient algorithms.

Week 2

Week 2 covers

Aspects

  • Using the command line to make programmable programs
  • Objects and classes

Algorithm

  • Binary search: Loop and recursion

main

Contains an example of the main block in order to ease importing code in to other programs

docu_strings

Contains examples of document strings.

command_line

Contains two example python files, which can be used to alter the behaviour of a program at run time. This allows you to create a single python program and then reuse it with different input files, options etc.

commandExample.py: Minimum workable example of a command line
commandLineIllus.py: Illustrates the common command 

objects

Includes a script with a simple example of an object; a grouping of data and functions.

data

Contains some text data files for use in this week's exercises.

About

Public code for Edinburgh OOSA course

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages