Warning
This page is located in archive.

3rd computer lab

The main objective is to really start programming beyond a 'hello world' app. Check the homework specification.

practising

  • Finishing MyTime class, constructor, …
  • methods __add__, __gt__, .
  • printing to standard output

Homework

  • code everything into the file vectors.py. The file may not import any external module.
  • create a class MyVector
  • contructor accepts one parameter - one dimensional array (like [1,2,3])
  • implement a method get_vector(self) that returns one dimensional array of vector elements
  • implement a special method __mul__(self,other) that computes the scalar product (sometimes called dot product or inner product) and return the result.
  • upload the file vectors.py before deadline.
courses/ae4b99rph/labs/weekly/week_03.txt · Last modified: 2013/10/09 12:34 by svobodat