开始时间: 04/23/2018 持续时间: Unknown
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.
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 Exercises1.py. 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.