0% found this document useful (0 votes)
11 views

Python_GGColabs_b1 (3)

The document is an educational outline for a course on Python programming and its applications in AI, focusing on tools like Google Colaboratory and Jupyter Notebook. It covers the basics of Python, its history, and practical exercises using datasets for analysis. The course aims to equip students with coding skills and familiarity with Python's capabilities in various fields such as data science and machine learning.

Uploaded by

nguyenlinh609003
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Python_GGColabs_b1 (3)

The document is an educational outline for a course on Python programming and its applications in AI, focusing on tools like Google Colaboratory and Jupyter Notebook. It covers the basics of Python, its history, and practical exercises using datasets for analysis. The course aims to equip students with coding skills and familiarity with Python's capabilities in various fields such as data science and machine learning.

Uploaded by

nguyenlinh609003
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 40

HCMC University of Technology & Education

Faculty of Economic

PYTHON LANGUAGE AND


and AI application
Introduction to Google Colaboratory with Python

Mr Lê Ngọc Hiếu

HCMC, April 2022


Learning goals

• Understand about python and how to code


with python language
• Understand and know how to use one of the
followings:
– Jupyter Notebook (offline)
– Google Colaborator (online on browser, need
google account)
– Visual Studio Code integrated with Python
Jupyter (Offline)
What are we going to learn?
1. Introduction to python
2. Introduction to Google Colaboratory
3. Exercises
4. References
PYTHON
Introduction
1. Introduction
Python is a widely used general-
purpose, high level programming
language. It was designed with an
emphasis on code readability, and its
syntax allows programmers to express
their concepts in fewer lines of code.
Python is a programming language
that lets you work quickly and
integrate systems more efficiently.
1. Introduction
• Python was created by Guido van
Rossum in 1991 and further
developed by the Python Software
Foundation.
1. Introduction
• Python was created by Guido van
Rossum in 1991 and further
developed by the Python Software
Foundation.
1. Introduction
Working with python gives us
endless possibilities. We can use python
in data science, machine learning,
Artificial intelligence, web development,
software development etc.
JUPYTER NOTEBOOK
Introduction
1. What is Jupyter?

Jupyter notebook/lab is a free and


open-source web application that
allows you to create and share
documents files that contain live code,
equations, visualizations, and
narrative text.
Its name jupyter comes from the
core supported programming
language that it supports i.e, Julia,
Python, and R.
1. What is Jupyter?

Jupyter was founded in 2015 by


Fernando Pérez, Brian Granger
Jupyter is a web-based notebook
and runs on your local hardware, it
uses your system Ram, CPU, and
hard-drive to process things.
GOOGLE COLABORATORY
Introduction & How to use
1. What is Colab?
Colab, or "Colaboratory", allows you to
write and execute Python in your
browser. Colab is a Python
development environment that runs in
the browser using Google Cloud, with
o Zero configuration required
o Access to GPUs free of charge
o Easy sharing
Whether you're a student, a data
scientist or an AI researcher, Colab
can make your work easier.
2. How to use?
To start working with Colab you first need to log
in to your google account, then go to this link
https://colab.research.google.com and Create a
new Python notebook.
2. How to use?
• Importing google drive to colab
To import google drive, write this code in code
section of colab and run it by Ctrl+Enter.

On running code, one blue link and a text box


will appear we need to provide a permission
text. So click the link and a new tab will open
where you will be asked for permission to
access google drive. After providing
permissions a text will be displayed that we
need to Copy and paste on colabs text box.
2. How to use?
Paste text in box and press enter. That
all to import gdrive. We can see
google drive on Left side Panel.
Starting with Google Colab
3. Google Colab
Print time
3. Google Colab
Mount Drive
3. Google Colab
Example 1 ~ Sample plot
3. Google Colab
Example 1 ~ Param input
Determining the size of Variable in Python
Loop in Python
If-Else in Python
List in Python
List in Python
List in Python
List in Python
Practice with Sample Dataset
Churn Dataset
https://www.kaggle.com/datasets/blastchar/telco-customer-churn
Context
"Predict behavior to retain customers. You can analyze all relevant customer
data and develop focused customer retention programs." [IBM Sample Data
Sets]
Content
Each row represents a customer, each column contains customer’s
attributes described on the column Metadata.

The data set includes information about:


• Customers who left within the last month – the column is called Churn
• Services that each customer has signed up for – phone, multiple lines,
internet, online security, online backup, device protection, tech support,
and streaming TV and movies
• Customer account information – how long they’ve been a customer,
contract, payment method, paperless billing, monthly charges, and total
charges
• Demographic info about customers – gender, age range, and if they have
partners and dependents
Read the dataset
Explore the dataset
Explore the dataset
Explore the dataset
Explore a column of the dataset
Explore the dataset
Explore the dataset
Exercises
Discover and explore the datasets:
• https://www.kaggle.com/datasets/mlg-ulb/cr
editcardfraud
• https://www.kaggle.com/datasets/harlfoxem
/housesalesprediction
• https://www.kaggle.com/datasets/rashikrah
manpritom/heart-attack-analysis-prediction-d
ataset
References

1. https://www.w3schools.com/python/python_intro.
https://www.geeksforgeeks.org/python-language-
introduction/
HCMC University of Technology & Education
Faculty of Economic

You might also like