CSC 500 - Homework Assignments


Homework Assignment #1 - Due: Thursday, September 1st

Complete programming assignment P4 on page 36.
Complete programming assignment P5 on page 76.
Complete programming assignment P3 on page 120.


Homework Assignment #2 - Due: Thursday, September 8th

Complete programming assignment D4 on page 124.
Complete programming assignment P7 on page 164. ---> will complete in class Thursday)


Homework Assignment #3 - Due: Thursday, September 15th

Complete programming assignment P3 on page 203.



Homework Assignment #4 - Due: Thursday, September 22nd

Complete programming assignment D3 on page 205.



Homework Assignment #5 - Due: Thursday, September 29th

Complete programming exercise D1 on page 334.



Homework Assignment #6 - Due: Thursday, October 27th

Complete programming exercise M1 on page 245.



Homework Assignment #7 - Due: Thursday, October 27th

Complete the chapter exercises (#1 - #23) on page 454.



Homework Assignment #8 - Due: Thursday, November 3rd

Write a recursive Python function that has a parameter representing a list of integers and returns the maximum stored in the list.

Thinking recursively, the maximum is either the first value in the list or the maximum of the rest of the list, whichever is larger.
If the list only has 1 integer, then its maximum is this single value, naturally.

Helpful Python syntax: If A is a list of integers, and you want to set the list B to all of the integers in A except the first one, you can write: B = A[1:len(A)]
(This sets B to the integers in A starting at index 1 and ending at index len(A)-1, the last index. The integer in the first position of A at index 0 is not included.)


Homework Assignment #9 - Due: Thursday, November 10th

Set up an experiment to test the run-time differences between various searching (sequential and binary) and sorting (selection, insertion, mergesort, and quicksort) algorithms on a list of random numbers.

The program should:

  1. Ask the user which test they want to run (searching or sorting). If searching, also ask the user for the number to search for.
  2. Generate a list of 50,000 random integers between 1 and 100.
  3. Print out the elapse time to search for the item (for both linear and binary search) or the elapse time for each sorting algorithm.



Homework Assignment #10 - Due: Thursday, November 17th

Read the ACM/IEEE-CS Joint Task Force Report on Software Engineering Code of Ethics and Professional Practice.

Write a 2-3 paragraph report on what you learn.


Page Last Updated August 26, 2022