Math 480, Spring 2015, Assignment 1

From cartan.math.umb.edu


Carefully define the following terms, then give one example and one non-example of each:[edit]

  1. Simple substitution cipher.

Solve the following problems:[edit]

  1. Exercise 1.4(a).

Coding projects:[edit]

  1. (Hello world) Choose a reasonably well-known programming language that has good support for large-integer arithmetic. (If you have no preference of your own, then I recommend Python.) Write and execute a program that prints the text "Hello world" to the screen. (The point: after completing this project you will have an interpreter and/or compiler installed on your machine, as well as a suitable text editor, and you will know how to use both of them.)
  2. (Two plus two) Write and execute a program that takes two integers as inputs and prints their sum. Test this on inputs larger than $2^{64}$. (The point: you need a way to pass input data to your programs. Common methods include command line arguments, reading from a file, piping to stdin, and interactively prompting the user. You might want to try all these methods, except perhaps the last, which is not as useful as it looks. This exercise also gives you a way to verify that your chosen language supports large integers in the way that you expect.)
  3. (Separate files) Write a program, in a file separate from the "two plus two" program you wrote above, that calls the summation function from that program and prints the result. (The point: in a large coding project, it is not usually a good idea to put all the code in one enormous file. Large projects usually have a "modular" structure, in which functions are grouped thematically into many small files. This is essential in organizations, where it facilitates collaboration, but even in one-person projects it has subtle advantages. After completing this exercise you will know how your chosen language supports modularization.)
--------------------End of assignment--------------------

Questions:[edit]

Solutions:[edit]