PYTHON
Welcome to Python 101 for Data Science! In this course we’re going to cover the
fundamental topics of the Python programming language.
After completing all four modules, you’ll be able to start writing your very own Python
programs. Based on recent surveys, Python was and still is the MOST popular, high-level,
open-source programming language!
It is a powerful, fast and dynamic programming language that runs everywhere. It’s also
interactive, object-oriented, and very easy to learn.
Anyone can create programs with it. It’s particularly great for web development, and
scientific computing. With its vast libraries, it’s also useful for data visualization and data
analytics. This course covers Python 3 and its many new features. It is comprised of four
modules. We'll start off with Python basics, writing your first program, and then cover, in
detail, types, expressions, variables, strings and string operations. In the 2nd module we'll
introduce you to Python data structures, namely lists and tuples, sets and [Link]
and tuples, are called compound data types and are one of the key types of data structures in
Python. Sets and dictionaries are types of collections.
In the 3rd module we'll cover Python programming fundamentals, including conditions,
branching, loops, functions, and objects and classes. Specifically, you’ll learn about
comparison and logic operators, and the if, else, and elif statements, for and while loops, how
to use some of Python’s built-in functions, as well as how build your own functions, and how
to create objects and classes using object constructors and attributes.
And finally, in the 4th module we'll show you how to work with data in Python. Specifically,
how to read and write with the open method, and how to load, work with, and save data in
pandas. The hands-on labs after each module will have you practice what you learn, using
Jupyter notebooks on Cognitive [Link] Labs.
There’s a lot to go over but by practicing all these concepts you’ll be well on your way to
using Python in your own applications. We’re sure you’ll be up and running with Python in
no time! So, adjust your headphones and let’s get
started!
General Information
Bookmark this page
A FEW THINGS TO KNOW ABOUT THIS COURSE
This course is self-paced. There is no instructor to follow or to rush you along -
you learn on your own schedule. This also means you are going to need to be
disciplined in your studies.
You can start it at any time and you can take as long as you need to
complete it. Your place in the course will be remembered and your labs will be
saved. However, we strongly recommend that you don't take prolonged breaks
between lessons as the mind tends to forget what it does not practice.
You can take the course (audit) as many times as you wish.
There is only ONE chance to pass the course, but you can make multiple
attempts per question (see the Grading Scheme section for details)
This is a hands-on course where you will gain practical skill by doing hands-on labs.
We provide a a complete virtual lab environment on the cloud that you can access
from anywhere as long as you have internet connection.
We strongly recommend that you use Chrome or Firefox browser
You can learn on mobile device if you install Cognitive Class mobile app from Apple
App Store (coming soon) or Google Play Store.
PREREQUISITES
Familiarity with Jupyter Notebooks
RECOMMENDED SKILLS PRIOR TO TAKING THIS
COURSE
Some Python programming experience
Learning Objectives
Bookmark this page
LEARNING OBJECTIVES
The objectives of this course is to get you started with Python as the programming
language and give you a taste of how to start working with data in Python.
In this course you will learn about:
o What is Python and why is it useful
o The application of Python
o How to define variables
o Sets and conditional statements in Python
o The purpose of having functions in Python
o How to operate on files to read and write data in Python
o How to use pandas, a must have package for anyone attempting data analysis in
Python.
Syllabus
Bookmark this page
Syllabus
Module 1 - Python Basics
o Your first program
o Types
o Expressions and Variables
o String Operations
Module 2 - Python Data Structures
o Lists and Tuples
o Sets
o Dictionaries
Module 3 - Python Programming Fundamentals
o Conditions and Branching
o Loops
o Functions
o Objects and Classes
Module 4 - Working with Data in Python
o Reading files with open
o Writing files with open
o Loading data with Pandas
o Working with and Saving data with Pandas
Grading Scheme
Bookmark this page
Grading Scheme
1. The minimum passing mark for the course is 70% with the following weights:
o 50% - All Review Questions
o 50% - The Final Exam
2. Though Review Questions and the Final Exam have a passing mark of 50%
respectively, the only grade that matters is the overall grade for the course.
3. Review Questions have no time limit. You are encouraged to review the course
material to find the answers. Please remember that the Review Questions are worth
50% of your final mark.
4. The final exam has a 1 hour time limit.
5. Attempts are per question in both, the Review Questions and the Final Exam:
o One attempt - For True/False questions
o Two attempts - For any question other than True/False
6. There are no penalties for incorrect attempts.
7. Clicking the "Final Check" button when it appears, means
your submission is FINAL. You will NOT be able to resubmit your answer
for that question ever again.
8. Check your grades in the course at any time by clicking on the "Progress"
tab.
Copyrights and Trademarks
Bookmark this page
Copyrights and Trademarks
IBM®, the IBM logo, and [Link]® are trademarks or registered trademarks of
International Business Machines Corporation in the United States, other countries, or
both. A current list of IBM trademarks is available on the Web at “Copyright and
trademark information” at: [Link]/legal/[Link]
References to IBM products or services do not imply that IBM intends to make them
available in all countries in which IBM operates.
Linux is a registered trademark of Linus Torvalds in the United States, other
countries, or both.
Microsoft, Windows, Windows NT, and the Windows logo are trademarks of
Microsoft Corporation in the United States, other countries, or both.
Java and all Java-based trademarks and logos are trademarks or registered
trademarks of Oracle and/or its affiliates.
UNIX is a registered trademark of The Open Group in the United States and other
countries.
Other product, company or service names may be trademarks or service marks of
others.
Learning Objectives
Bookmark this page
LEARNING OBJECTIVES
In this lesson you will learn the basics of Python and you will write your first Python
program:
o Types
o Expressions and Variables
o String Operations
Let’s try your first program in Python. A statement or expression is an instruction the
computer will run or execute. Perhaps the simplest program you can write is a print
statement. When you run the print statement, Python will simply display the value in the
parentheses. The value in the parentheses is called the argument. If you are using a Jupiter
notebook in this course, you will see a small rectangle with the statement.
This is called a cell. If you select this cell with your mouse, then click the run cell button. The
statement will execute. The result will be displayed beneath the cell. We will follow this
paradigm in the videos.
It’s customary to comment your code. This tells other people what your code does. You
simply put a hash symbol proceeding your comment. When you run the code, Python will
ignore the comment. A Syntactic error is when Python does not understand your code.
For example, if you spell print "frint", you will get an error message. A Semantic error is
when your logic is wrong.
For example, if you enter Python 102 instead of Python 101, you don't get an error message,
but your code is wrong.