Intro. to Programming : Csci 1020

Instructor: Ted Wetherbee

Fond du Lac Tribal & Community College
2101 14th Street
Cloquet, Minnesota 55720

Office: W217
Phone: 218-879-0840
Email: ted@fdltcc.edu

Spring 2018 Class Schedule:
  8-8:50am   MTWHF  Calculus 2       Room 228
  9-9:50am   MWF    Statistics       Room 228
  10-10:50am MWF    College Algebra  Room 228
  12-12:50pm MW     Intro. to Prog.  Room 208
Office Hours in Room W217:
  Monday  Tuesday Wednesday Thursday  Friday
  11-noon 9-10am  11-noon   9-10am    11-noon

Course Website: http://cs.fdltcc.edu/wetherbee/cs1020/

The schedule and most class materials will be online from this web site. You can also navigate from this simpler URL: cs.fdltcc.edu

All current and past assignments are on the course website listed by date under the tentative schedule.

Internet services: Email and D2L Course Access

FDLTCC E-services: http://fdltcc.edu/student-support/eservices/
Email account info: http://fdltcc.edu/campus-email-accounts-update/
Email login: https://portal.office.com
D2L Course Login: https://fdltcc.ims.mnscu.edu/

Text

How to Think Like a Computer Scientist: Learning with Python, by Allen Downey, Jeff Elkner, and Chris Meyers, edition 2.0.17.

Free PDF (2.0.17)
Online Book (2.0.17)

This book is available in the FDLTCC book store at a reasonable price. Note that there is a Python 3 version available, but we are using the Python 2 version for practical reasons we will explain in class.

There are many online Python references, and here are some that may be useful within this course in a practical way. (These links to references below are repeated again within this syllabus under Online Python References.)

Python 2.7.13: Language Reference
Python 2.7.13: Standard Library
Python 2.7.13: Tkinter (GUI=Graphical User Interface)
Python and Tkinter textbook
Tkinter 8.5 reference

Materials needed: USB Key/Drive

Get yourself a USB key/drive. It does not have to be large. Managing your code is a very important aspect of programming!

Create a directory/folder for each programming assignment. Save your Python code often with short but descriptive names in the correct folder. NEVER use spaces in program or directory/folder names! Use underscores_between_words, if necessary. End Python script names with ".py". Disable "hide known file extensions" in a folder view so that you can see the ".py" extensions--which should always be there for Python scripts. When you refine a program, it is extremely helpful to save versions with different names incrementally, e.g. p1.py, p1b.py, p1c.py, and so on.

Include descriptive comments within your Python scripts so that you can later open the file, read comments, and thus know what it does, the author, when it was written, and so forth. You don't have to write a great deal, but you should write enough in a way so that a complete stranger could read your Python script and thus understand what it does, who wrote it, and when it was written. That stranger will usually be yourself! Programmers are humans; it is easy to completely forget almost everything about a code. Explain it to yourself within your code with comments, and do it as if you are writing to a complete stranger.

Python on Room 208 and Open Computer Lab machines

Some of the room 208 machines have Python 2.7 installed, some also with Python 3. All the Mac and Windows machines in the open computer lab have Python 2.7. Use Python 2.7 for our class work. As usual for FDLTCC classroom and computer lab machines, never expect anything you leave on a machine to remain on the machine! Always copy your programs and other files to a USB key/drive, and label them carefully so that you can find your files later.

Python on FDLTCC Mac Machines

All the Mac machines in labs and classrooms have Python installed, and this should be version 2.7 . Click the Finder (bottom left with the "half-face"), click "Applications" in the left pane, scroll down and click the "Utilities" folder, then click "Terminal". To run Python IDLE: At the terminal prompt (user$), type idle then press Enter.

Installing Python on Your Computer

Python is free. It is probably already be installed if you have a Linux or Mac PC/notebook. There are many free distributions of Python you can install on your Windows machine. You will want to install Python on your own machine if that is what you will use for this course, a notebook or desktop machine.

Here are some usage and Python setup directions: Directions

Grading

Grades are kept in D2L

16 Programs      16 x 50 = 800
-------------------------------
                           800 total

90-100%   A
80-90%    B
70-80%    C
60-70%    D
0-60%     F

The Course

Start programming assignments early! The best way to start is to start something. create a text file (source code) with the name of the programming assignment, say p1.py, then write comments at the top of the text file with your name, the date, and the purpose of the program. Then, save the program file (p1.py) on your Desktop and your USB drive. within a folder/directory labeled p1 . Create directories in the same place for each programming assignment, thus p1, p2, ..., p16 for the course. Keep your program source code in the correct directory. Carefully backup your directories on your USB drive; this is especially important if you use FDLTCC lab machines because anything on them may be deleted. On your own machine, it is still a great idea to regularly backup files on your machine to a USB drive. These are mechanics, but these are very important mechanics for programming.

Do your reading early! Work through the programming examples in your textbook! Your text has numerous interactive python examples which always have lines beginning with ">>>". Open a Python session, and work these out yourself. You should get the same results on your machine. Your reading and work on textbook exercises will prepare you for the final exam.

Note that your grade depends on completing programming assignments. Email your completed programming assignment to me (ted@fdltcc.edu) with your program as an attachment. Your programs should each be self-documented.

As with most things humans do (playing the piano, team sports, etc.), learning programming is mostly about practice, study, and gaining experience. Python programs which run correctly and solve the problem are the goal, and this almost always goes well with perseverance and steady work. Contact me for any questions, email is best, and include your source code to reference for specific questions.

Tentative Schedule - Spring 2018 - csci1020

jan08 mon  1 ch1 intro.; Python in lab, personal machine; interactive vs. program script
jan10 wed  2 p1

jan15 mon  HOLIDAY
jan17 wed  3 ch2 variables; Tkinter intro.; p2

jan22 mon  4 ch3 functions; P3: p3
jan24 wed  5

jan29 mon  6 ch4 tests and recursion; P4:
jan31 wed  7

feb05 mon  8 ch5 functions and return values; P5:
feb07 wed  9

feb12 mon 10 ch6 iteration; P6:
feb14 wed 11

feb19 mon HOLIDAY
feb21 wed 12 ch7 strings; P7:

feb26 mon 13 ch8 lists; P8:
feb28 wed 14

mar05 mon 15 ch9 tuples; P9:
mar07 wed 16

BREAK

mar19 mon 17 ch10 dictionaries; P10:
mar21 wed 18

mar26 mon 19 ch11 files and IO; P11:
mar28 wed 20

apr02 mon 21 ch12-14 classes and objects; P12:
apr04 wed 22

apr09 mon 23 ch17 linked lists; P13:
apr11 wed 24

apr16 mon 25 ch18 stacks; P14:
apr18 wed 26

apr23 mon 27 ch19 queues; P15:
apr25 wed 28

apr30 mon 29 ch20 trees; P16:
may02 wed 30

may07 mon 31 presentations in class
may09 wed NO CLAASES
may10 thu T1
may11 fri T2

may14 mon T3
may15 tue T4

Programming, and Python

Python is currently the most popular language for learning programming (a recent status.). It is probably the most useful language to know for general use. This happy convergence between ease of learning and practical application has been rare since programming computers developed as a science & art in the late 1950s. Hence, it is easy to find excellent Python programming resources and especially so online.

Because of Python's many uses, we could go in many directions. It is used for systems programming, for games, for scientific applications, for business applications, for online applications, and so on. The essentials of Python are small, but the extensions to Python and its uses are vast.

We will cover basics of Python (which also address principles of programming in any language) and work on selected applications which arise as apt. About half of the course will focus on graphical and online applications; these are remarkably tractable in Python compared to almost any other language.

What might be confusing at first are variations of Python and usage. One can run Python interactively line-by-line in a shell, or execute Python scripts (programs) in an interpreter. There are Cython, iPython, Jython, and others. We may explore iPython (Interactive Python) a bit because this is rapidly becoming popular, and you can see this in action using SageMath.

The easiest way to develop a program in Python (and complete your assignments) is to start with something very simple that works, then incrementally enhance and add features.

Online Python references

These links below are some useful Python references. The version for these is 2.7.13, and you will probably see a different version on your machine, say 2.7.10 or maybe even 2.6.4 . No problem, not likely anyway in this course. There are few difference which will arise if you use Python versions 2.7.* or 2.6.* where "*" is some minor version number.

Python 2.7.13: Language Reference
Python 2.7.13: Standard Library
Python 2.7.13: Tkinter (GUI=Graphical User Interface)
Python and Tkinter textbook
Tkinter 8.5 reference

What you should not overly concern yourself over is the sea of online advice regarding Python. The online Python community is vibrant, large, and mostly tries to be helpful. There is a lot of excellent, valuable material online.

Note that anyone on the planet can go online and offer advice. Use Python as you will in legal and at least benign fashion. You do not need anyone's approval of your style within the limits of course requirements, but do write your own code. You need to write programs which work, not "Pythonic" code to please online purists. Do study simple examples that work, and first focus on getting results in straightforward, simple fashion.

Please feel free to consult with others in class and myself on your code--but short of having others write your programs for you. Don't ask for online help in writing programming assignments; Very few people in the online Python community would knowingly help in that.


Disabilities Notice

Fond du Lac Tribal and Community College is committed to providing equitable access to learning opportunities for all students. Under the Americans with Disabilities Act and Section 504 of the Rehab Act Fond du Lac Tribal and Community College provides students with disabilities (e.g., mental health, attentional, learning, chronic health, sensory or physical) reasonable accommodation to participate in educational programs, activities or services. Students with disabilities requiring accommodation to participate in class activities or meet course requirements should first complete an Intake Form and necessary requirements with Anita Hanson in the Office of Disability Services, (phone 879.0819, email: anita.hanson@fdltcc.edu) to establish an accommodation plan.

Sexual Violence

Fond du Lac Tribal and Community College is committed to providing an environment free of all forms of discrimination and sexual harassment, including sexual assault, domestic and dating violence, gender or sex-based bullying and stalking. If you or someone you know has experienced gender or sex-based violence (intimate partner violence, attempted or completed sexual assault, harassment, coercion, stalking, etc.), know that you are not alone. Fond du Lac Tribal and Community College has staff members trained to support survivors in navigating campus life, accessing resources, providing accommodations, assistance completing with protective orders and advocacy. For more information regarding the Campus Security Report, the following link will give you a report on the Clery Compliance and Security Report at FDLTCC: http://fdltcc.edu/PDF/CleryComplianceandSecurityRep01t.pdf

Please be aware that all Fond du Lac Tribaland Community College employees are required to report any incidents of sexual violence and, therefore it cannot guarantee the confidentiality of a report, but it will consider a request for confidentiality and respect it to the fullest extent possible. If you wish to report sexual misconduct or have questions about school policies and procedures regarding sexual misconduct, please contact either of the following:

Stephanie Hammitt, Vice President of Administration, 
at 218.879.0810, shammitt@fdltcc.edu

Russell Swagger, Dean of Student Services, 
at 218-879-0805, russell.swagger@fdltcc.edu

Anita Hanson, Counselor, 
at 218-879-0819, anita.hanson@fdltcc.edu

Content is neither approved nor reviewed by FDLTCC.