Getting Started

Tasks

  1. Complete reading this lesson, which involves the following:
    1. Install Python 3 and Eclipse in your machine
    2. Configure Eclipse
    3. Run your first Python program: Hello World!
    4. Practice with the interactive mode

Learning Outcomes

By the end of this lesson, you should be able to:

  1. Install a Python IDE in your machine
  2. Customize the Python IDE with configurations specific to the course
  3. Create Python projects and modules
  4. Write a simple Python program
  5. Execute Python programs
  6. Run the Python Interpreter in the interactive mode to execute simple commands

Key Terms/Concepts

Course Introduction

Welcome to the programming journey! Computer programming, or what is sometimes referred to as coding, is a fascinating and powerful learning experience that you will find rewarding both academically and in your day-to-day life. We use computer programs all the time, but this time, you are not going to learn how to use computer programs which is a skill mastered by many individuals in our time. Instead, this course invites you to be a developer through participating in writing code and developing programs. Starting today, you are no longer a passive user - you are an active programmer joining the large community of programmers around the world.

If you are taking this course part of your computer science degree, then this is one of your most important courses. Computer science itself is not programming, but programming exists everywhere in computer science. Think about the English alphabet, in terms of reading and writing. These characters are not the amazing novels or historical essays that you enjoy reading. However, these characters are the basic components of these works. In computer science, programming is the main tool used by scientists to translate algorithms, execute experiments using computers, configure hardware, write and publish web and phone applications and much more.

If you are not a computer science major and decided to take this course as an elective, we are confident you will not regret the decision. A new perspective would be opened to you with computer programming and you will be empowered with a tool that will help you in your future steps. The job market favors those with programming capacities, and graduate schools consider this an advantage taken into consideration when evaluating applications. Think about it as learning a new language like Spanish, German or Japanese, but with many more benefits.

But before we actually jump to the programming, we need to do some preparations which is the focus of this lesson.

Introduction to Lesson 1

In this lesson, you learn how to setup your machine to allow programming in Python. This involves several steps such as installing Python, installing an Integrated Development Environment (IDE) and making some configurations. Once you complete the installation and configuration steps, you will learn how to launch this software and use it in writing, editing and executing Python code.

To beginners, this might appear as an overwhelming task. But do not worry, we provide you with detailed steps on how to achieve this. Just follow the steps, and if you get stuck on any step, ask for assistance. Also as good news, what you do in this lesson you only need to do once, and future lessons do not involve installations or major configuration steps.

Make your focus in this lesson to make your machine run Python. It is fine if you do not understand the rationale behind some steps. Just make it run. You will find that some steps will later make more sense to you as you progress in the course.

It is best to undertake the following steps in a place with fast internet connectivity.

Let us start.

Installation

Follow the installation instructions at: CP104 Software Installation.

Go to a scheduled lab session for help if you have difficulties with these installations!

The Python Tutor is an online tool for running simple Python programs and visualizing how they execute. The instructor's lecture videos make use of it often.

Open up the Python Tutor and copy and paste the line:

        print("Hello World!")
      

into its editing box at line 1, and press , then press on the next page.

Congratulations, you have entered and executed your first Python program!

Complete the lab at: CP104: Lab 01.

Note that completing this and other labs is a standard part of completing the course requirements. Labs must be completed and submitted for grading. Check the lab schedule at: CP104: Labs

Go to a scheduled lab session for help if you have difficulties with any lab!

In Lesson 1 you have learned about Python IDEs and how to install Python on your machine. You were introduced to Eclipse and the Python Tutor. You also wrote and ran your first Python program.

In this week’s assessment, you will practice what you learned in this lesson and also learn some other features like how to export and import Python projects. In the next two modules you will be engaging with the basics of Python programs. You will get introduced to variables and expressions, in addition to input and output commands.

References

  1. CP104 Software Installation.
  2. Eclipse documentation - Current Release  
  3. PyDev Manual

Copyright Note

All figures in this lesson are screenshots taken from a local computer. Permission is granted for anyone wanting to share or edit the figures.