Lecture Overview
Mathematics is the language of the sciences and of fields where patterns and systematic processes are analyzed. Study in the mathematical sciences provides the tools and a framework essential for the understanding of a modern technological society. The MCS curriculum fosters the development of logical and analytical thinking and is designed to provide a basic foundation appropriate for students who seek careers in computing. Emphasis is given to the mathematical theory of computer science and computational methods. source.
- Overview of the course
- Course structure and the syllabus.
- The overarching goal of the course is to introduce you to mathematical computer science as described by the paragraph above. Along the way we will learn to program in Python, but the goal is to use Python to explore the mathematical foundation and background behind computer science and computing.
- The topics will be learning to program in Python combined with material drawn from the recommended clusters of study on this page
- Started a basic overview of the Von Neumann architecture
Exercises
Install Python - see this page or this page for a guide. There are currently two versions of python, version 2.7 and version 3.4. The two versions are mostly compatible, but we will work with Python 3.4.
- Bookmark and skim some helpful Python pages. You should at least skim the table of contents of these pages so you know where to look when you need information.
- Beginner's Guide. You should definitely read this page and the various links on it.
- The Python Tutorial - This provides an introduction to the language and one goal in this course will be to work our way through this entire tutorial.
- The Python Standard Library - a reference guide to python. While we won't be going through this top to bottom, we will be referencing many of the features described by this page.
- Learn Python the Hard Way - an alternative tutorial to python which you might find helpful.
- Set up your python environment. The best guide I suggest you follow is this one. (It says to use Python 2.7, but the page is from several years ago. I agreed with what it said about Python 3 at the time, but since that page was written Python 3 has come a long way and we will be using it in this course.)
- For an editor, that page suggests you use Notepad++ for Windows, gedit for Linux, and TextWrangler for MacOS which are good suggestions to install.
- The most recent editor getting a lot of buzz is Atom. It has only come out in the past year or so, but already has a lot of followers! You might consider giving it a try.
- I don't suggest you start with it, but the text editor I use is vim. It has (many) more features than the above editors. This post gives a good overview on what benifit you get. Vim is an advanced editor, but as a computer scientist and/or programmer, you will be creating and editing a LOT of text files. A tool like vim, while having a slight learning curve, will payoff enormously because of the amount of text editing you will do. If you are interested, the best way to start with vim is the vimtutor which is built in to vim, just run ":help tutor" after starting vim. Alternatively, there is the Interactive Vim Tutorial and Vim Adventures. If you are interested, I still suggest you wait until you have a little familiarity with the simple tools first.
- I strongly recommend against it for this course, but there are tools called Integrated Development Environments. These tools have a steep learning curve and most are specific to python. The goal in this course is to prepare you for any kind of computing in many languages by providing you a solid foundation, and spending a lot of effort (these tools are not simple!) takes time away from focusing on the course material.
- Your first python program:
Open the text editor you decided upon. Enter the text
print("Hello World!")
print("Hello Again")
print("I'm a print statement")
print('Wow')
print('A statement with "double quotes" inside.')
- Save this to a file called hw1.py
- In a terminal, run "python hw1.py" without the quotes. You should see the text printed and not an error message.
- Add another print statement of your choice and rerun the program.
- Put a pound sign (#) at the beginning of one of the lines. What happens when you run the code?
This exercise has some screenshots of what your editor and python terminal should look like.