Python Programming: A Concise Introduction

About this course: The goal of the course is to introduce students to Python Version 3.x programming using hands on instruction. It will show how to install Python and use the Spyder IDE (Integrated Development Environment) for writing and debugging programs. The approach will be to present an example followed by a small exercise where the learner tries something similar to solidify a concept. At the end of each module there will be an exercise where the student is required to write simple programs and submit them for grading. It is intended for students with little or no programming background, although students with such a background should be able to move forward at their preferred pace. The course is four modules long and is designed to be completed in four weeks.

Created by:  Wesleyan University

  • Bill Boyd
    Taught by:  Bill Boyd, Visiting Associate Professor and Visiting Scholar
    Quantitative Analysis Center
Commitment4 weeks of study, 4-5 hours/week
How To PassPass all graded assignments to complete the course.
User Ratings
Average User Rating 4.5See what learners said
Beginning to Program in Python
In this module we introduce writing functions in Python using the convenient Spyder development environment. The lesson begins with instructions on installing the popular Anaconda distribution of Python, which includes Spyder. It continues by showing how to use the editor in Spyder to type in a function and then run it. Each lesson alternates between introducing a concept by example and having the student test his/her understanding by constructing a function similar to that example. The module lecture is contained in a single program source file named This file, which should be downloaded by the student at the beginning of the module, contains the complete lecture except the solutions to the ungraded exercises. The student should work each of these before viewing the instructor's solution. By using the unique capability of Spyder (using IPython Notebooks), the program file is segmented into cells each of which can be executed independently of the others. Thus the student does not have to manage multiple program files and finishes with a lecture file with filled-in student exercises that can be used for reference. Python topics included in this module are print statement, arithmetic operators, input statement, combining of strings, if statement, while loop, and for loop. The module ends with a series of small functions to write to be submitted for grading. Grading is done by custom software and should normally take only minutes with no limit to the number of re-submissions. Hopefully, you'll finish with a perfect score.

10 videos5 readings
  1. Video: Welcome and introduction
  2. Reading: Setting up Spyder
  3. Reading: Starting Python. Our first lecture and exercise file.
  4. Reading: -- the exercise/lecture file for this module.
  5. Reading: Note about a minor problem with Spyder
  6. Video: Introduction to the Spyder IDE
  7. Video: Arithmetic operations
  8. Video: Our first functions
  9. Video: Creating strings and using them in print statements.
  10. Video: The "input" statement and combining strings
  11. Video: Using the "if" statement
  12. Video: Converting strings to numbers. Using the remainder operator
  13. Video: Introduction to loops - the "while" loop
  14. Video: The "for" loop; tracking down errors
  15. Reading: Practice functions for debugging Python code
Graded: Programming problems for module 1
Working with Lists and Importing Libraries. The Random library.
Lists, datatypes, libraries, the random library. 

8 videos1 reading
  1. Reading: Exercises 2 -- the exercise/lecture file for this module.
  2. Video: Introduction to lists
  3. Video: Lists continued
  4. Video: Stepping through lists using loops
  5. Video: Introduction to datatypes
  6. Video: Converting datatypes
  7. Video: Working with lists of sublists; writing a small report
  8. Video: Lists continued
  9. Video: Introduction to libraries. The random library.
Graded: Programming problems for module 2
Tuples, Data Dictionaries, Text and CSV Files
So far, we have one collection data type, the list. In this module we take up two more: the tuple and the data dictionary. After that we introduce reading and writing text files and give some illustrative examples. Finally, we take up reading and writing Comma Separated Value (CSV) files.

4 videos3 readings
  1. Reading: -- The exercise/lecture file for this module.
  2. Reading: Python files needed for this module.
  3. Reading: Text and CSV files used during this module.
  4. Video: Using tuples and data dictionaries
  5. Video: Reading and writing files
  6. Video: Writing scripts in Python
  7. Video: Reading and writing CSV files
Graded: Programming problems for module 3
Functional Values, Sorting, Formatting, Statistics, and a Menu Driven Database Program
In this lesson, we take up a variety of topics and give an example using much of what we've covered in the course. First, we show how functions can return values. Then we show how to build lists of various types and how to sort these lists. After that we use the statistic library to introduce basic descriptive statistics. Finally, we show how to use formatting in print statements. As a recap, we work through an application making use of what we've learned to build a menu-driven program that maintains a small database.

10 videos2 readings
  1. Reading: -- the exercise/lecture file for this module.
  2. Reading: Additional program and data files needed for this module.
  3. Video: Long strings, random library, building and sorting lists
  4. Video: Descriptive statistics
  5. Video: Formatting print statements
  6. Video: Starting the database application
  7. Video: Displaying the records
  8. Video: Adding and deleting records
  9. Video: Editing records
  10. Video: Saving records to a CSV file
  11. Video: Loading the records from the CSV file
  12. Video: Running our database application as a stand-alone program
Graded: Programming problems for module 4
How It Works
Each course is like an interactive textbook, featuring pre-recorded videos, quizzes and projects.
Help from Your Peers
Help from Your Peers
Connect with thousands of other learners and debate ideas, discuss course material, and get help mastering concepts.
Earn official recognition for your work, and share your success with friends, colleagues, and employers.
Wesleyan University
At Wesleyan, distinguished scholar-teachers work closely with students, taking advantage of fluidity among disciplines to explore the world with a variety of tools. The university seeks to build a diverse, energetic community of students, faculty, and staff who think critically and creatively and who value independence of mind and generosity of spirit.

No comments:

Post a Comment