Introduction to Python  
 
 

Lesson 1

Course Expectations and Requirements:
Course written by Will Levine and Erik Ruggles, '10. Course based on John Sweetnam's Java course.
This course will teach you the basics of programming with Python. You will start off learning the basics of coding with Python and then go on to design and construct Graphical User Interfaces (GUIs). Along the way you will learn what object oriented programming is and how to do it with Python. By the end of this course, you will be able to read and code object oriented programs proficiently with Python.
Your readings for this course will be online at Python Programming
All exercises are to be turned in properly commented and fully functional. Be sure that your name and all contributors to your work are mentioned in the comments at the beginning of your code.
Lesson 1: Hello World, An Introduction to Python
Lesson Outline:

  • Some background on Python
  • Write and modify a “Hello World” program
  • Introduction to strings and string manipulation
Lesson Goals:
  • Properly use and manipulate strings
  • Properly use the print command
  • Learn how to correctly run Python programs
Readings:
The Introduction section on Python Programming . This includes Overview, Getting Python, and Setting it up. The Interactive mode and Getting help sections are optional, but recommended. You will also read Creating Python Programs and Variables and Strings in the Learning to program in Python section.

Exercises:
Create a Hello World program with extra features. Use the print statement to experiment with different ways of combining strings, numbers, and variables with each other and with others of themselves. Print lines with no line breaks and add line breaks to strings manually. You will use print statements and will manipulate strings very often in programming with Python, so familiarize yourself with them.
One last note: print statements can be very useful when debugging a program. A well-placed print statement can be used to determine what section of your code are or are not being reached and when.


Files to Be Downloaded