Programming 1
Week 8: Exercises

1. Time Class

Write a class Time that represents a time of day with 1-second resolution, e.g. 11:32:07.

2. Vector Class

Write a class Vector that represents a vector in n-dimensional space.

3. Delete All Odd

You are given a class LinkedList with a single attribute head that points to the head of a linked list. Each list node is an instance of the Node class:

class Node:
  def __init__(self, val, next):
    self.val = val
    self.next = next
    
class LinkedList:
  def __init__(self, head):
    self.head = head

Write a method that deletes all odd values from a LinkedList of integers.