Programming

MATH 230 : Fall 2023

Department of Mathematics - SUNY Geneseo

Course Description

This course serves as an introductory programming course for mathematics majors. Basic programming techniques for solving problems typically encountered by mathematicians will be developed. The course covers basic procedural techniques such as algorithms, variables, input/output, data types, selection, iteration, functions, and graphing. Good programming and commenting practices will be emphasized.

Instructor

Cesar Aguilar, South Hall 325A

Office Hours

Tue 8:30-9:30, 10:45-11:45
Thu 10:45-11:45

Class Meetings

Tue & Thu, 9:30-10:45, South Hall 336

Software

Anaconda Python
64-bit graphical installer

Final Exam

Tuesday, December 19, 3:30-6:00PM, South Hall 336

Textbook and Resources

Student File Upload

  Upload your homework, test, lab

Latest

The current week content will be displayed here during the semester. For now, see the Schedule tab.

Homework

Title Due Date Week No.
Homework 0 - Using Python Sep 1, 2023 1
Homework 1 - Data Types and Math Operators Sep 8, 2023 1
Homework 2 - Booleans and if-elif-else Sep 19, 2023 3
Homework 3 - Loops Sep 28, 2023 4
Homework 4 - Functions Oct 17, 2023 5
Homework 5 - Lists Oct 24, 2023 6
Homework 6 - More with Lists Nov 3, 2023 7
Homework 7 - Dictionaries Nov 13, 2023 8
Homework 8 - More with Strings Nov 14, 2023 9
Homework 9 - Reading and Writing Files Nov 21, 2023 10
Homework 10 - More with Files Nov 29, 2023 11
Homework 11 - NumPy Dec 12, 2023 12
Homework 12 - Basic Plotting Dec 19, 2023 13

Schedule

Week 1  Aug 28 - Sep 01
Introduction, Data Types, Arithmetic
Topics: Introduction, Data Types, Arithmetic
What to read: Chapter 0, Chapter 1
Other material worth reading: Data Types, Operators and Expressions
Aug 28 First day of classes
HOMEWORK HW 0DUE: Sep 01
HW DUE HW 0DUE: Sep 01
HOMEWORK HW 1DUE: Sep 08
Week 2  Sep 04 - Sep 08
Booleans, if Statements
Topics: Booleans, if Statements
Read: Chapter 2
Read only up to if statements.
Sep 04 Labor Day: No Classes
HW DUE HW 1DUE: Sep 08
Week 3  Sep 11 - Sep 15
if/elif/else Statements
Topics: if/elif/else Statements
Read: Chapter 2
Read only up to elif statements, we will cover loops next week.
Lab: Lab 1
HOMEWORK HW 2DUE: Sep 19
Week 4  Sep 18 - Sep 22
Loops
Topics: Loops
Read: Chapter 2
Textbook Videos:
  1. while Loops
  2. for Loops
HW DUE HW 2DUE: Sep 19
HOMEWORK HW 3DUE: Sep 28
Week 5  Sep 25 - Sep 29
Functions, Scope, Errors
Topics: Functions, Scope, Errors
Read: Chapter 3
Textbook Videos:
  1. Importing Modules (Ignore material on installing modules and the pyperclip module)
  2. Defining Functions
  3. Global and Local Scope
  4. Catching Errors
  5. Guess the Number Game
  6. More Function Basics with Mosth
HW DUE HW 3DUE: Sep 28
HOMEWORK HW 4DUE: Oct 17
NEXT WEEK Test 1 on Oct 3, 9:28 AM – 10:45 AM
Week 6  Oct 02 - Oct 06
Lists, Tuples
Topics: Lists, Tuples
Read: Chapter 4, Lists and Tuples (supplement)
Textbook Videos:
  1. Lists
  2. Looping Over Lists
  3. List Methods
  4. More List Basics with Mosh
  5. More List Methods with Mosh
  6. More Tuples with Mosh
HOMEWORK HW 5DUE: Oct 24
TEST 1 Oct 3, 9:28 AM – 10:45 AM
Week 7  Oct 09 - Oct 13
More with Loops, Lists, and Conditionals
Topics: More with Loops, Lists, and Conditionals
Oct 09-10 Fall Break: No Classes
HOMEWORK HW 6DUE: Nov 03
Week 8  Oct 16 - Oct 20
Dictionaries
Topics: Dictionaries
Read:
  1. Textbook - Chapter 5
  2. Dictionaries in Python - realpython.com
Textbook Videos:
  1. Udemy Course - Section 7
HW DUE HW 4DUE: Oct 17
HOMEWORK HW 7DUE: Nov 13
Week 9  Oct 23 - Oct 27
More on Python Strings
Topics: More on Python Strings
Read:
  1. Textbook - Chapter 6
  2. Strings in Python - realpython.com
Textbook Videos:
  1. Udemy Course - Section 8
HW DUE HW 5DUE: Oct 24
HOMEWORK HW 8DUE: Nov 14
Week 10  Oct 30 - Nov 03
Reading and Writing Files
Topics: Reading and Writing Files
Read:
  1. Textbook - Chapter 9
  2. Reading and Writing Files - realpython.com
Data files:
  1. state_capitals.csv
Textbook Videos:
  1. Udemy Course - Section 11
HW DUE HW 6DUE: Nov 03
HOMEWORK HW 9DUE: Nov 21
Week 11  Nov 06 - Nov 10
More with Files and Data
Topics: More with Files and Data
Read:
  1. Textbook - Chapter 9
  2. Reading and Writing Files - realpython.com
Textbook Videos:
  1. Udemy Course - Section 11
HOMEWORK HW 10DUE: Nov 29
Week 12  Nov 13 - Nov 17
NumPy - Arrays, Matrices
Topics: NumPy - Arrays, Matrices
HW DUE HW 7DUE: Nov 13
HW DUE HW 8DUE: Nov 14
HOMEWORK HW 11DUE: Dec 12
Week 13  Nov 20 - Nov 24
Matplotlib - Basic 2D Plotting
Topics: Matplotlib - Basic 2D Plotting
Nov 22-24 Thanksgiving Break: No Classes
HW DUE HW 9DUE: Nov 21
HOMEWORK HW 12DUE: Dec 19
Week 14  Nov 27 - Dec 01
Numerical Integration
Topics: Numerical Integration
Instructor Videos:
  1. Review of Riemann Sums (watch first)
  2. Coding Examples
HW DUE HW 10DUE: Nov 29
Week 15  Dec 04 - Dec 08
Bar Charts, Histograms, and 3D plots
Topics: Bar Charts, Histograms, and 3D plots
Instructor Videos:
  1. Bar charts
  2. Histograms
  3. 3D plots
Week 16  Dec 11 - Dec 15
Final Exam Week
Topics: Final Exam Week
What to Read: Review for final exam
Dec 11 Last day of classes
HW DUE HW 11DUE: Dec 12
HW DUE HW 12DUE: Dec 19

Syllabus

Learning Outcomes

Upon successful completion of MATH 230 - Programming, a student will be able to:

    Grading Scheme

    Below is the tentative course grading scheme. The grading scheme may change during the semester at the discretion of the instructor. Any changes to the grading scheme will be announced in class before the final exam. If homework assignments are done in groups, then a student must achieve a passing grade in all individual assessments (e.g., tests and final exam) to pass the course.

    ItemPercentage
    Homework10
    Tests40
    Final45
    Labs5
    GradePercentage
    A94-100
    A−90-93
    B+87-89
    B83-86
    B−80-82
    C+77-79
    C73-76
    C−70-72
    D60-69
    E< 60

    Tests and Exam

    There will be 3-4 tests scheduled evenly throughout the semester. The final exam is scheduled for Tuesday, December 19, 3:30-6:00PM, South Hall 336. The final exam will be cumulative, that is, any topic covered in the course could be tested in the final exam. There will be no make-up for a missed test or final exam under any circumstances. If a student misses a test and can present evidence of an extenuating circumstance then the weight of the missed test will be redistributed to the final exam weight. Having the cold or flu is not an extenuating circumstance. Examples of extenuating circumstances include a medical emergency, a serious prolonged illness, or the death of a member of your immediate family.

    Homework

    There will be approximately 10-12 homework assignments throughout the semester. You will be given approximately 5 days to submit your solutions to the homework problems. Homework solutions should be written in Python using a .py file extension and your .py file should be uploaded using the file upload link. I encourage you to collaborate with your colleagues on your assignments/labs but your final submitted work should be your own (see Academic Dishonesty statement below).

    Textbook and Resources

    There are two recommended textbooks for the course: Automate the Boring Stuff with Python and Think Python. Both textbooks are free. I will primarily reference the first book (Automate the Boring Stuff with Python) and you may want to enroll in the Udemy Course that accompanies the textbook. The first 15 videos of the course can be found on YouTube. To view the remaining videos you would need to enroll in the Udemy course.

    Technology

    We will be using the general purpose programming language Python for this course. Download and install Python here.

    Office Hours and Math Learning Center

    I encourage you to come to my office (South Hall 325A) whenever you are having trouble with any part of the course material, seeking academic advice, or you just want to chat about mathematics in general. If you want to meet with me outside of my office hours, you will need to make an appointment, preferably via email. I also encourage you to visit the Math Learning Center located in South Hall 332 where you can receive free tutoring on a walk-in basis by highly qualified upper level students. Access to in-person office hours and to the MLC will depend on social distancing guidelines set by the College.

    Email Communication

    I will do my best to reply to student email regarding the logistics of the course within 24 hours during the working week (Mon-Fri). However, due to the potential large volume of emails, inquiries regarding homework problems and/or specific course content should be made during office hours or after class.

    Academic Dishonesty and Plagiarism

    Please read, and follow, Geneseo's Academic Dishonesty and Plagiarism policy. Below is the definition of plagiarism and its consequences as described in SUNY Geneseo's Academic Dishonesty and Plagiarism statement:

    Plagiarism is the representation of someone else's words or ideas as one's own, or the arrangement of someone else's material(s) as one's own. Such misrepresentation may be sufficient grounds for a student's receiving a grade of E for the paper or presentation involved or may result in an E being assigned as the final grade for the course.

    If there is sufficient evidence of academic dishonesty on a homework assignment, all students involved will receive a zero score on the homework assignment and I will provide the department chairperson, the dean of academic planning and advising, and the student(s) with a written report of the violation, the penalty imposed and the counseling provided to the students involved. A second instance of academic dishonesty on a homework assignment will result in a final grade of E for the course for all students involved. Academic dishonesty on a test/final exam will result in a final grade of E for the course.

    Academic Accommodations

    SUNY Geneseo is dedicated to providing an equitable and inclusive educational experience for all students. The Office of Accessibility (OAS) will coordinate reasonable accommodations for persons with disabilities to ensure equal access to academic programs, activities, and services at Geneseo.

    Students with approved accommodations may submit a semester request to renew their academic accommodations. Please visit the OAS website for information on the process for requesting academic accommodations.

    Questions? Contact the OAS by email, phone, or in-person:

    Office of Accessibility Services
    Erwin Hall 22
    585-245-5112
    access@geneseo.edu