TA

COMP1029P: Python Bridging Course (Fall 2014)

Lab_1

  • Overview: installation of python3 (IDLE under windows), variables, string and list operations (slicing + concatination), booleans

  • Remember:

    • Indentation: instead of using {} to identify the range of a block as in C/C++/Java, python uses indentation

    • Slicing: index starts from 0; last index not included; "-" sign is the reverse index ...

COMP1029P: Python Bridging Course (Fall 2014) Tutorial

Week 2

In [2]:
# Function

def double(x):
    
    return 2 * x

double(4)
Out[2]:
8
In [3]:
# Comment style 1

def like(stuff):
    # This function takes a string called stuff as input
    # and returns a new string that has "I like " in
    # front of the input string

    return "I ...

COMP3511: Operating System (Spring 2014) Project 2 Synchronization

The purpose of this project is to understand basic concepts in synchronization by implementing some primitives like lock, condition variable and monitor(semaphore is already implemented in Nachos), and then using them to solve the bunded buffer problem.

It is easier to understand these concepts based on some real life ...