0% found this document useful (0 votes)
12 views34 pages

GitHub Copilot Setup for Python

The document outlines a training session on GitHub Copilot for Python, covering installation of PyCharm IDE, the GitHub Copilot plugin, and fundamental Python concepts including data structures, control flow, functions, classes, and file handling. It emphasizes the proprietary nature of the content and the legal implications of unauthorized distribution. Additionally, it includes demo programs to illustrate practical applications of the discussed topics.

Uploaded by

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

GitHub Copilot Setup for Python

The document outlines a training session on GitHub Copilot for Python, covering installation of PyCharm IDE, the GitHub Copilot plugin, and fundamental Python concepts including data structures, control flow, functions, classes, and file handling. It emphasizes the proprietary nature of the content and the legal implications of unauthorized distribution. Additionally, it includes demo programs to illustrate practical applications of the discussed topics.

Uploaded by

bilisashobe430
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

bilisashobe430@gmail.

com
NSM9J7ZWYC
GitHub Copilot for Python

Proprietary
This filecontent. ©Greatfor
is meant Learning. All Rights
personal useReserved. Unauthorized use or distribution prohibited
by bilisashobe430@[Link] only.
Sharing or publishing the contents in part or full is liable for legal action.
Agenda
In this session, we will discuss:
● Introduction to GitHub Copilot
● Steps to install PyCharm IDE
● Installing the GitHub Copilot plugin to PyCharm
● Python Basics
bilisashobe430@[Link]
NSM9J7ZWYC

● Data Structures in Python


● Control Flow and Conditional Statements
● Functions and Methods
● Python Classes and Objects
● Working with files
● Demo Programs
● Case Study
Proprietary
This filecontent. ©Greatfor
is meant Learning. All Rights
personal useReserved. Unauthorized use or distribution prohibited
by bilisashobe430@[Link] only.
Sharing or publishing the contents in part or full is liable for legal action.
bilisashobe430@[Link]
NSM9J7ZWYC
Introduction to GitHub Copilot

Proprietary
This filecontent. ©Greatfor
is meant Learning. All Rights
personal useReserved. Unauthorized use or distribution prohibited
by bilisashobe430@[Link] only.
Sharing or publishing the contents in part or full is liable for legal action.
Introduction to GitHub Copilot
● AI Developer Tool
● A generative AI model developed by GitHub, OpenAI, and Microsoft

o Sharp and intelligent code suggestions

o Auto completes codes


bilisashobe430@[Link]
NSM9J7ZWYC o Code faster

o Understand file type

o Cloud code understanding

o Database understanding

o IDE integration

o Gives best suggestions

Proprietary
This filecontent. ©Greatfor
is meant Learning. All Rights
personal useReserved. Unauthorized use or distribution prohibited
by bilisashobe430@[Link] only.
Sharing or publishing the contents in part or full is liable for legal action.
Introduction to GitHub Copilot
The IDE’s supported by GitHub are:

bilisashobe430@[Link]
NSM9J7ZWYC

Proprietary
This filecontent. ©Greatfor
is meant Learning. All Rights
personal useReserved. Unauthorized use or distribution prohibited
by bilisashobe430@[Link] only.
Sharing or publishing the contents in part or full is liable for legal action.
bilisashobe430@[Link]
NSM9J7ZWYC
Steps to install PyCharm IDE

Proprietary
This filecontent. ©Greatfor
is meant Learning. All Rights
personal useReserved. Unauthorized use or distribution prohibited
by bilisashobe430@[Link] only.
Sharing or publishing the contents in part or full is liable for legal action.
Steps to Install PyCharm IDE
Step 1: Visit the official website: [Link]
Step 2: Choose the right operating system Windows, Mac, or Linux.
Step 3: Download the .exe file of PyCharm Community Edition.
Step 4: Install it to your local system.
bilisashobe430@[Link]
NSM9J7ZWYC

Proprietary
This filecontent. ©Greatfor
is meant Learning. All Rights
personal useReserved. Unauthorized use or distribution prohibited
by bilisashobe430@[Link] only.
Sharing or publishing the contents in part or full is liable for legal action.
Installing the GitHub Copilot plugin
to PyCharm
bilisashobe430@[Link]
NSM9J7ZWYC

Proprietary
This filecontent. ©Greatfor
is meant Learning. All Rights
personal useReserved. Unauthorized use or distribution prohibited
by bilisashobe430@[Link] only.
Sharing or publishing the contents in part or full is liable for legal action.
Installing the GitHub Copilot plugin to PyCharm
Step 1: Click on File  Settings  Choose Plugin  Search for GitHub Copilot  Install
Step 2: Restart the PyCharm IDE
Step 3: Link PyCharm to GitHub Copilot (Trial Version)
Step 4: Add the activation code and login
bilisashobe430@[Link]
NSM9J7ZWYC

Proprietary
This filecontent. ©Greatfor
is meant Learning. All Rights
personal useReserved. Unauthorized use or distribution prohibited
by bilisashobe430@[Link] only.
Sharing or publishing the contents in part or full is liable for legal action.
bilisashobe430@[Link]
Python Basics
NSM9J7ZWYC

Proprietary
This filecontent. ©Greatfor
is meant Learning. All Rights
personal useReserved. Unauthorized use or distribution prohibited
by bilisashobe430@[Link] only.
Sharing or publishing the contents in part or full is liable for legal action.
Python Basics
Variables are used to store data values that can be manipulated and accessed throughout a program.

Examples:

bilisashobe430@[Link]
NSM9J7ZWYC

Proprietary
This filecontent. ©Greatfor
is meant Learning. All Rights
personal useReserved. Unauthorized use or distribution prohibited
by bilisashobe430@[Link] only.
Sharing or publishing the contents in part or full is liable for legal action.
Python Basics

bilisashobe430@[Link]
NSM9J7ZWYC

Proprietary
This filecontent. ©Greatfor
is meant Learning. All Rights
personal useReserved. Unauthorized use or distribution prohibited
by bilisashobe430@[Link] only.
Sharing or publishing the contents in part or full is liable for legal action.
Python Basics
Datatypes specify the type of data that can be stored inside a variable.

int, float,
Numeric holds numeric values
complex

String str holds sequence of characters


bilisashobe430@[Link]
NSM9J7ZWYC
Sequence list, tuple, range holds collection of items

Mapping dict holds data in key-value pair form

Boolean bool holds either True or False

Set set, frozenset hold collection of unique items

Proprietary
This filecontent. ©Greatfor
is meant Learning. All Rights
personal useReserved. Unauthorized use or distribution prohibited
by bilisashobe430@[Link] only.
Sharing or publishing the contents in part or full is liable for legal action.
Python Basics

bilisashobe430@[Link]
NSM9J7ZWYC

Proprietary
This filecontent. ©Greatfor
is meant Learning. All Rights
personal useReserved. Unauthorized use or distribution prohibited
by bilisashobe430@[Link] only.
Sharing or publishing the contents in part or full is liable for legal action.
Python Basics
Strings in Python are sequences of characters enclosed in single, double, or triple quotes.

bilisashobe430@[Link]
NSM9J7ZWYC

Proprietary
This filecontent. ©Greatfor
is meant Learning. All Rights
personal useReserved. Unauthorized use or distribution prohibited
by bilisashobe430@[Link] only.
Sharing or publishing the contents in part or full is liable for legal action.
Python Basics

bilisashobe430@[Link]
NSM9J7ZWYC

Proprietary
This filecontent. ©Greatfor
is meant Learning. All Rights
personal useReserved. Unauthorized use or distribution prohibited
by bilisashobe430@[Link] only.
Sharing or publishing the contents in part or full is liable for legal action.
bilisashobe430@[Link]
NSM9J7ZWYC
Data Structures in Python

Proprietary
This filecontent. ©Greatfor
is meant Learning. All Rights
personal useReserved. Unauthorized use or distribution prohibited
by bilisashobe430@[Link] only.
Sharing or publishing the contents in part or full is liable for legal action.
Data Structures in Python
List is an ordered collection of similar or different types of items separated by commas and enclosed within
square brackets.

bilisashobe430@[Link]
NSM9J7ZWYC

Proprietary
This filecontent. ©Greatfor
is meant Learning. All Rights
personal useReserved. Unauthorized use or distribution prohibited
by bilisashobe430@[Link] only.
Sharing or publishing the contents in part or full is liable for legal action.
Data Structures in Python
Tuple is an ordered sequence of items same as a list. The only difference is that tuples are immutable. Tuples
once created cannot be modified.

bilisashobe430@[Link]
NSM9J7ZWYC

Proprietary
This filecontent. ©Greatfor
is meant Learning. All Rights
personal useReserved. Unauthorized use or distribution prohibited
by bilisashobe430@[Link] only.
Sharing or publishing the contents in part or full is liable for legal action.
Data Structures in Python
Dictionary is an ordered collection of items. It stores elements in key/value pairs. Here, keys are unique
identifiers that are associated with each value.

bilisashobe430@[Link]
NSM9J7ZWYC

Proprietary
This filecontent. ©Greatfor
is meant Learning. All Rights
personal useReserved. Unauthorized use or distribution prohibited
by bilisashobe430@[Link] only.
Sharing or publishing the contents in part or full is liable for legal action.
Data Structures in Python
Set is an unordered collection of unique items. Set is defined by values separated by commas inside braces { }.

bilisashobe430@[Link]
NSM9J7ZWYC

Proprietary
This filecontent. ©Greatfor
is meant Learning. All Rights
personal useReserved. Unauthorized use or distribution prohibited
by bilisashobe430@[Link] only.
Sharing or publishing the contents in part or full is liable for legal action.
Control Flow and Conditional
bilisashobe430@[Link]

Statements
NSM9J7ZWYC

Proprietary
This filecontent. ©Greatfor
is meant Learning. All Rights
personal useReserved. Unauthorized use or distribution prohibited
by bilisashobe430@[Link] only.
Sharing or publishing the contents in part or full is liable for legal action.
Control Flow and Conditional Statements
Control Flow Statements:
We use the if statement to run a block code only when a certain condition is met.
• if statement
• if … else statement
• if ... elif… else statement
bilisashobe430@[Link]
NSM9J7ZWYC

Conditional Statements:
• for loop - is used to iterate over sequences such as lists, tuples, strings, etc.
• while loop - is used to run a block code until a certain condition is met.

Proprietary
This filecontent. ©Greatfor
is meant Learning. All Rights
personal useReserved. Unauthorized use or distribution prohibited
by bilisashobe430@[Link] only.
Sharing or publishing the contents in part or full is liable for legal action.
bilisashobe430@[Link]
NSM9J7ZWYC
Functions and Methods in Python

Proprietary
This filecontent. ©Greatfor
is meant Learning. All Rights
personal useReserved. Unauthorized use or distribution prohibited
by bilisashobe430@[Link] only.
Sharing or publishing the contents in part or full is liable for legal action.
Functions and Methods in Python
• Functions in Python are blocks of code that perform a specific task or computation.
• They can be defined using the def keyword followed by a function name and a block of code.
• Functions can take zero or more input parameters (arguments) as inputs.
• They can return a result using the return statement.
• Functions are typically defined outside of classes, although they can also be nested within other functions.
bilisashobe430@[Link]
NSM9J7ZWYC

• Functions are called by their name, followed by parentheses, with arguments passed inside the parentheses.

Proprietary
This filecontent. ©Greatfor
is meant Learning. All Rights
personal useReserved. Unauthorized use or distribution prohibited
by bilisashobe430@[Link] only.
Sharing or publishing the contents in part or full is liable for legal action.
Functions and Methods in Python
• Methods are functions that are associated with objects, typically within classes.
• They are defined within the class definition and operate on instances (objects) of that class.
• Methods have access to the data and attributes of the object they are called on, via the self parameter.
• Methods are called on objects using the dot notation.
bilisashobe430@[Link]
NSM9J7ZWYC

Proprietary
This filecontent. ©Greatfor
is meant Learning. All Rights
personal useReserved. Unauthorized use or distribution prohibited
by bilisashobe430@[Link] only.
Sharing or publishing the contents in part or full is liable for legal action.
bilisashobe430@[Link]
NSM9J7ZWYC
Python Classes and Objects

Proprietary
This filecontent. ©Greatfor
is meant Learning. All Rights
personal useReserved. Unauthorized use or distribution prohibited
by bilisashobe430@[Link] only.
Sharing or publishing the contents in part or full is liable for legal action.
Python Classes and Objects
Classes:
• A class is a blueprint for creating objects.
• It defines the attributes (data) and methods (functions) that objects created from the class will have.
• The basic structure of a class in Python includes the class keyword, followed by the class name and a colon.
• The class body contains attributes and methods.
bilisashobe430@[Link]
NSM9J7ZWYC

Objects:
• An object is an instance of a class. It is created using the class name followed by parentheses.
• Objects have their own set of attributes and can call methods defined in the class.

Proprietary
This filecontent. ©Greatfor
is meant Learning. All Rights
personal useReserved. Unauthorized use or distribution prohibited
by bilisashobe430@[Link] only.
Sharing or publishing the contents in part or full is liable for legal action.
bilisashobe430@[Link]
NSM9J7ZWYC
Working with files

Proprietary
This filecontent. ©Greatfor
is meant Learning. All Rights
personal useReserved. Unauthorized use or distribution prohibited
by bilisashobe430@[Link] only.
Sharing or publishing the contents in part or full is liable for legal action.
Working with Files
Working with files in Python involves several operations such as reading from files, writing to files, and performing
various file-related tasks.
• Opening and closing files
• Reading files
• Writing files
bilisashobe430@[Link]
NSM9J7ZWYC
• Appending files

Proprietary
This filecontent. ©Greatfor
is meant Learning. All Rights
personal useReserved. Unauthorized use or distribution prohibited
by bilisashobe430@[Link] only.
Sharing or publishing the contents in part or full is liable for legal action.
bilisashobe430@[Link]
NSM9J7ZWYC
Demo Programs

Proprietary
This filecontent. ©Greatfor
is meant Learning. All Rights
personal useReserved. Unauthorized use or distribution prohibited
by bilisashobe430@[Link] only.
Sharing or publishing the contents in part or full is liable for legal action.
Demo Programs
• Program to convert decimal to octal
• Program to print ASCII Value of a character
• Python Program for cube sum of first n natural numbers

bilisashobe430@[Link]
NSM9J7ZWYC

Proprietary
This filecontent. ©Greatfor
is meant Learning. All Rights
personal useReserved. Unauthorized use or distribution prohibited
by bilisashobe430@[Link] only.
Sharing or publishing the contents in part or full is liable for legal action.
bilisashobe430@[Link]
NSM9J7ZWYC
Case Study

Proprietary
This filecontent. ©Greatfor
is meant Learning. All Rights
personal useReserved. Unauthorized use or distribution prohibited
by bilisashobe430@[Link] only.
Sharing or publishing the contents in part or full is liable for legal action.
Summary
A quick recap:

● GitHub Copilot is a generative AI model developed by GitHub, OpenAI, and Microsoft.


● Explained the steps to install PyCharm and GitHub Copilot.
● Demonstrated simple codes related to the basics of python like variables, datatypes etc.
● Listed various data structures in Python.
bilisashobe430@[Link]
NSM9J7ZWYC

● Illustrated programs related to control flow and conditional statements, functions, methods, python classes,
objects, and files.
● Generated code for employee feedback system.

Proprietary
This filecontent. ©Greatfor
is meant Learning. All Rights
personal useReserved. Unauthorized use or distribution prohibited
by bilisashobe430@[Link] only.
Sharing or publishing the contents in part or full is liable for legal action.

You might also like