---
tags: mth225, python
---
# MTH 225: Python crash course
As a basic tool for exploring mathematical ideas and applying them to computer science, we'll be using the **Python** programming language frequently in the course starting in weeks 2 or 3. You'll be learning the essentials of Python to enable you to explore math with this tool. We will be doing an **extremely minimal** treatment of Python --- in no way is it a complete introduction, and it's "just enough to be dangerous". But it will be solid, if minimal, and if you want to learn more, you'll be well set up to do so. ([CIS 161](https://cis.gvsu.edu/~wolffe/courses/cs161/docs/cs161Syllabus.pdf) is a good place to go for more Python.)
Since our coverage of Python is minimal, we will not use class time to cover it. Instead, in this assignment you'll work through parts of a self-paced course online to learn what you need to know.
:::info
**Time requirements:** This will vary widely depending on your prior experience with programming and with Python and other specifics of the assignment. **Most students in the past who have started with zero knowledge of Python (but some programming experience) have said this assignment takes a total of about 6-8 hours to complete**. This is a significant chunk of time, so the way to do this is spread it out, about half an hour a day over the course of a couple of weeks. Of course, you can go faster than that if you want.
**Value:** Completion of this assignment by the target date below will earn you **three tokens** which you can use to spend to extend deadlines, earn free Passes on some assignments, and more. It has no other direct impact on your course grade. Technically there is no penalty for non-completion. However, we will be using Python a lot in the course, including on Weekly Challenges. Therefore non-completion of this assignment may result in deficiencies that do affect you.
**If you are already fluent with Python or prefer to become fluent some other way:** Then you can skip this assignment. You do not need to demonstrate competency in some other way, but the reward of three tokens is *only* given for completing this particular assignment.
**Target date:** All work must be submitted no later than **11:59pm Eastern on Friday, September 17**.
:::
## Instructions
1. Go to http://www.codeacademy.com and create a free account, or sign in with a social media or GitHub account.
2. Then go to https://www.codecademy.com/learn/learn-python. This is a free, self-paced entry level minicourse on **Python 2**. (Do *not* sign up for the Codeacademy course on *Python 3*.) Although you may be prompted to sign up for "Codeacademy Pro", you do not need to do this to take the short course, and **you do not need to pay or give credit card information**. If you set up an account but cannot access the minicourse without giving payment information, please let me (Prof. Talbert) know.
3. The minicourse is split up into 12 units, each consisting of 1-2 lessons that are done in the browser. (No installation of anything is needed.) **Complete the first 9 units of the course: "Python Syntax" through "Exam Statistics".** (The remaining 3 units are optional; we won't use any of the material in them, in MTH 225, but you're free to go through them if you want.) When you complete a lesson, you will see a checkmark go up next to that lesson, like this: https://i.imgur.com/5ySdn7g.jpg. **You do not need to complete the "Projects" or "Quizzes" at the end of the lessons**; in fact you can't access these unless you have paid for the Pro version of Codeacademy (which you do NOT need to do).
:::warning
:warning: **Important note about Python 2 versus Python 3** :warning:
The *current* version of Python, which we will use in the class, is **Python 3** not Python 2. We are using the Codecademy course for Python 2 because it's free; the Python 3 course requires a paid subscription. **There are two especially important differences between Python 2 and Python 3** that you should be aware of as you work:
1. **The `print` command in Python 3 requires that the thing being printed goes in parentheses**; the parentheses are *not* requires in Python 2. For example in Python 3 you would type `print("Hello world")`; in Python 2 it would be `print "Hello world"`.
2. **The `/` character used for division works differently**. In Python 3, when using this command to divide two integers, it returns a decimal or floating-point result. In Python 2, it returns an *integer* result. For example in Python 3, `16/3` returns `5.3333333`. In Python 2, it would return just `5`.
There are other major differences between Python 2 and Python 3, but these two are the biggest. You'll simply have to remember to make these adjustments when doing Python in the class once this tutorial is done.
:::
## Submitting your work
**To submit your work:** When you have completed the nine units assigned above, you will just need to show me your account page at Codeacademy with all the required lessons checked off. The checkmarks on all nine units will be counted as proof of completion. You can:
- Show me your screen in person at a class meeting or drop-in hours;
- Show me your screen in a Zoom meeting; or
- Email me a screenshot of your screen that shows your name on the screen as well as all of the checks.
As long as you are getting me verifiable proof that you completed the lessons, we're good.
## Getting help
You can ask me (Talbert) for help on this assignment at any time through whatever medium (email, Campuswire, etc.) works for you.
You can also ask questions of your classmates, especially on Campuswire, but you may not use their work as your own. For academic honesty purposes, we'll treat this assignment the same as a Weekly Challenge. See the syllabus for that particular policy.
<!--stackedit_data:
eyJoaXN0b3J5IjpbLTE1ODYyMTk4NiwxMDg3MDQ0NzE3XX0=
-->