This document outlines the objectives and content of the course GE3151 Problem Solving and Python Programming. The course is intended to teach students the basics of algorithmic problem solving using Python. It covers topics like computational thinking, Python data types, control flow, functions, strings, lists, tuples, dictionaries, files and modules. The course contains 5 units that will teach students how to define problems, develop algorithms, implement solutions in Python using conditionals, loops, functions and data structures, perform input/output with files and use modules and packages.
Tweepy is an open source Python package that gives you a very convenient way to access the Twitter API with Python. Tweepy includes a set of classes and methods that represent Twitter's models and API endpoints, and it transparently handles various implementation details, such as: Data encoding and decoding.
This document provides an overview of the Python programming language. It states that Python is a high-level, general-purpose programming language created by Guido van Rossum in 1991. Python emphasizes code readability and allows programmers to develop applications rapidly. It has a simple syntax compared to languages like C and C++. Python also supports cross-platform development and has a comprehensive standard library. The document discusses popular Python libraries, IDEs, and notebooks for data science and machine learning tasks. It provides examples of basic data types in Python and highlights advantages like requiring less code and programming time.
In today's technological world, Python is often used as a support language for software developers, for build control and management, testing, and in many other ways. Python is a high-level general programming language. It is an object-oriented programming language. Python is a high-stage, interpreted programming language known for its simplicity and readability. There are various options for Python courses in Pune, but Cyber Success stands as the best IT training institute. Cyber Success has a team of experienced faculty members who are experts in their fields.
This presentation provides an introduction to the Python programming language. It covers Python's basics like data types, variables, conditional statements, loops, functions, modules, file handling, object-oriented programming concepts, and popular Python libraries for data science like Pandas, Django, and Numpy. The goal is to give attendees a solid understanding of Python and how it is used widely in fields like data science, machine learning, and artificial intelligence.
This document provides an introduction to the Python programming language. It discusses that Python is a popular general-purpose programming language created by Guido van Rossum in 1980. It is commonly used for web development, artificial intelligence, and software development. The document outlines how to set up a Python environment, including using an integrated development environment (IDE). It also introduces key Python concepts like variables, data types, arithmetic operations, user input, comments, conditions, loops, and functions.
The type of a value refers to the kind of data it represents. In Python, the main types are:
- int - integer numbers like 1, 2, 100
- float - floating point numbers like 1.5, 3.14159
- str - strings, sequences of characters like 'hello'
- bool - boolean values True or False
When you write code, Python assigns a type to each value. The type determines how it can be used and what operations are valid on it. For example, you can add two integers but not add an integer to a string. Checking and understanding types is important for writing correct Python code.
This document provides an overview of the Python programming language. It covers Python basics like syntax, datatypes, modules, and control structures. It also discusses topics like functions, classes, files, and popular Python modules. The document contains an agenda that outlines these topics and provides code samples to illustrate Python concepts hands-on. It aims to equip readers with foundational Python programming knowledge.
Python is a widely-used, high-level programming language known for its simplicity, readability, and extensive library support. It is favored by developers for its ease of use and ability to handle diverse tasks, making it suitable for various applications ranging from web development to data analysis and artificial intelligence.
Python was created in the late 1980s by Guido van Rossum. The first version was released in 1991. It is derived from the ABC language. Python is an interpreted, object-oriented scripting language that is portable, easy to read and maintain. It has a large standard library and supports GUI, web and database applications. Major versions include Python 2.7 and Python 3.0 which introduced changes like print becoming a function. Python is widely used in areas like web development, science, education and software development.
Python is a general-purpose, high-level programming language that is widely used for web and application development, data science, and machine learning. It was created by Guido van Rossum in 1991 and takes inspiration from languages like C, Java, Lisp, and Modula-3. Python code is human-readable and has an easy to learn syntax that uses indentation rather than brackets to indicate blocks of code. It supports multiple programming paradigms including object-oriented, imperative, and functional programming.
This document contains frequently asked Python interview questions organized into different sections like Python fundamentals, OOPs concepts, Pandas, Numpy etc. It begins with introductory questions about Python's history, benefits, dynamic and interpreted nature. Then it covers core concepts like data types, modules, scopes, lists vs tuples. The document also includes questions on OOPs concepts, Pandas for data analysis, Numpy for numerical computing and commonly used Python libraries. It ends with examples of Python programs to solve different problems.
This document provides an introduction to the Python programming language. It discusses why Python is a good choice, describes its main features like being free, easy to learn, and having a large library of tools. It also covers installing Python via Anaconda distribution, using interactive environments like Jupyter notebooks, Python syntax basics such as variables, operators, and input/output, and resources for further learning.
This document provides an introduction and overview of the Python programming language. It discusses that Python was created by Guido Van Rossum in 1991 and named after Monty Python. Python can be used for both procedural and object-oriented programming approaches. It is an interpreted language that is free to use, easy to learn, and has a simple syntax. Python is popular for web development, data analysis, science/engineering, and more. The document then covers Python syntax and provides examples of using variables, data types, and the interactive mode versus script mode of writing Python code.
The document presents an overview of the Python programming language. It discusses that Python was created by Guido van Rossum in 1991 and is commonly used for web development, software development, mathematics, and system scripting. The document then covers various features of Python, including that it is an interpreted, interactive, object-oriented, and high-level language. It also discusses Python's use, history, syntax elements like indentation and comments, variables, data types, and string operations.
Introduction to Python Basics ProgrammingRaveendra R
Open source general-purpose. Multiplatform programming language
Object Oriented, Procedural, Functional
Easy to interface with C/ObjC/Java/Fortran
Easy to interface with C++ (via SWIG)
Great interactive environment
Python 'philosophy' emphasis readability, clarity and simplicity
The Interactive Interpreter
it is very easy to learn and understand.
It is extensible, you can easily plug new modules in your Python installation and extend its functionality
Telangana State, India’s newest state that was carved from the erstwhile state of Andhra
Pradesh in 2014 has launched the Water Grid Scheme named as ‘Mission Bhagiratha (MB)’
to seek a permanent and sustainable solution to the drinking water problem in the state. MB is
designed to provide potable drinking water to every household in their premises through
piped water supply (PWS) by 2018. The vision of the project is to ensure safe and sustainable
piped drinking water supply from surface water sources
Ad
More Related Content
Similar to Lacture 1- Programming using python.pptx (20)
This presentation provides an introduction to the Python programming language. It covers Python's basics like data types, variables, conditional statements, loops, functions, modules, file handling, object-oriented programming concepts, and popular Python libraries for data science like Pandas, Django, and Numpy. The goal is to give attendees a solid understanding of Python and how it is used widely in fields like data science, machine learning, and artificial intelligence.
This document provides an introduction to the Python programming language. It discusses that Python is a popular general-purpose programming language created by Guido van Rossum in 1980. It is commonly used for web development, artificial intelligence, and software development. The document outlines how to set up a Python environment, including using an integrated development environment (IDE). It also introduces key Python concepts like variables, data types, arithmetic operations, user input, comments, conditions, loops, and functions.
The type of a value refers to the kind of data it represents. In Python, the main types are:
- int - integer numbers like 1, 2, 100
- float - floating point numbers like 1.5, 3.14159
- str - strings, sequences of characters like 'hello'
- bool - boolean values True or False
When you write code, Python assigns a type to each value. The type determines how it can be used and what operations are valid on it. For example, you can add two integers but not add an integer to a string. Checking and understanding types is important for writing correct Python code.
This document provides an overview of the Python programming language. It covers Python basics like syntax, datatypes, modules, and control structures. It also discusses topics like functions, classes, files, and popular Python modules. The document contains an agenda that outlines these topics and provides code samples to illustrate Python concepts hands-on. It aims to equip readers with foundational Python programming knowledge.
Python is a widely-used, high-level programming language known for its simplicity, readability, and extensive library support. It is favored by developers for its ease of use and ability to handle diverse tasks, making it suitable for various applications ranging from web development to data analysis and artificial intelligence.
Python was created in the late 1980s by Guido van Rossum. The first version was released in 1991. It is derived from the ABC language. Python is an interpreted, object-oriented scripting language that is portable, easy to read and maintain. It has a large standard library and supports GUI, web and database applications. Major versions include Python 2.7 and Python 3.0 which introduced changes like print becoming a function. Python is widely used in areas like web development, science, education and software development.
Python is a general-purpose, high-level programming language that is widely used for web and application development, data science, and machine learning. It was created by Guido van Rossum in 1991 and takes inspiration from languages like C, Java, Lisp, and Modula-3. Python code is human-readable and has an easy to learn syntax that uses indentation rather than brackets to indicate blocks of code. It supports multiple programming paradigms including object-oriented, imperative, and functional programming.
This document contains frequently asked Python interview questions organized into different sections like Python fundamentals, OOPs concepts, Pandas, Numpy etc. It begins with introductory questions about Python's history, benefits, dynamic and interpreted nature. Then it covers core concepts like data types, modules, scopes, lists vs tuples. The document also includes questions on OOPs concepts, Pandas for data analysis, Numpy for numerical computing and commonly used Python libraries. It ends with examples of Python programs to solve different problems.
This document provides an introduction to the Python programming language. It discusses why Python is a good choice, describes its main features like being free, easy to learn, and having a large library of tools. It also covers installing Python via Anaconda distribution, using interactive environments like Jupyter notebooks, Python syntax basics such as variables, operators, and input/output, and resources for further learning.
This document provides an introduction and overview of the Python programming language. It discusses that Python was created by Guido Van Rossum in 1991 and named after Monty Python. Python can be used for both procedural and object-oriented programming approaches. It is an interpreted language that is free to use, easy to learn, and has a simple syntax. Python is popular for web development, data analysis, science/engineering, and more. The document then covers Python syntax and provides examples of using variables, data types, and the interactive mode versus script mode of writing Python code.
The document presents an overview of the Python programming language. It discusses that Python was created by Guido van Rossum in 1991 and is commonly used for web development, software development, mathematics, and system scripting. The document then covers various features of Python, including that it is an interpreted, interactive, object-oriented, and high-level language. It also discusses Python's use, history, syntax elements like indentation and comments, variables, data types, and string operations.
Introduction to Python Basics ProgrammingRaveendra R
Open source general-purpose. Multiplatform programming language
Object Oriented, Procedural, Functional
Easy to interface with C/ObjC/Java/Fortran
Easy to interface with C++ (via SWIG)
Great interactive environment
Python 'philosophy' emphasis readability, clarity and simplicity
The Interactive Interpreter
it is very easy to learn and understand.
It is extensible, you can easily plug new modules in your Python installation and extend its functionality
Telangana State, India’s newest state that was carved from the erstwhile state of Andhra
Pradesh in 2014 has launched the Water Grid Scheme named as ‘Mission Bhagiratha (MB)’
to seek a permanent and sustainable solution to the drinking water problem in the state. MB is
designed to provide potable drinking water to every household in their premises through
piped water supply (PWS) by 2018. The vision of the project is to ensure safe and sustainable
piped drinking water supply from surface water sources
This comprehensive Data Science course is designed to equip learners with the essential skills and knowledge required to analyze, interpret, and visualize complex data. Covering both theoretical concepts and practical applications, the course introduces tools and techniques used in the data science field, such as Python programming, data wrangling, statistical analysis, machine learning, and data visualization.
Thingyan is now a global treasure! See how people around the world are search...Pixellion
We explored how the world searches for 'Thingyan' and 'သင်္ကြန်' and this year, it’s extra special. Thingyan is now officially recognized as a World Intangible Cultural Heritage by UNESCO! Dive into the trends and celebrate with us!
Mieke Jans is a Manager at Deloitte Analytics Belgium. She learned about process mining from her PhD supervisor while she was collaborating with a large SAP-using company for her dissertation.
Mieke extended her research topic to investigate the data availability of process mining data in SAP and the new analysis possibilities that emerge from it. It took her 8-9 months to find the right data and prepare it for her process mining analysis. She needed insights from both process owners and IT experts. For example, one person knew exactly how the procurement process took place at the front end of SAP, and another person helped her with the structure of the SAP-tables. She then combined the knowledge of these different persons.
3. Syllabus
Unit 1: Introduction to Python programming
Interactive mode and script mode, structure of a program, script execution, debugging-
errors, comments and error messages.
Identifiers, keywords, constants, variables, data types and assignments.
Arithmetic operators and expressions, relational operators, conditions and logical operators,
operator precedence.
Input and output statements, control structures: if-else, loops, break and continue statements.
Introduction to in-built functions: invoking functions.
Handling missing data values: isnull, notnull.
4. Syllabus
Unit 2: Python data structures (strings, lists, tuples and dictionary)
Strings: initialize strings, subscript operator, access elements, string operations, built-in
string functions and methods, slicing a string, escape sequences.
Lists: concepts of mutable lists, list operations: create, initialize, access, traverse,
append/insert new elements, search, sort, replace, removing elements; inbuilt list
functions and methods, list comprehensions.
Tuples: concepts of immutable tuples, tuple operations: create, initialize, access
elements; tuple assignment, slicing, and indexing.
Dictionary: concept of key-value pair, literals, operations: create, initialize, access,
traverse, append, add and remove keys, dictionary functions and methods.
5. Syllabus
Unit 3: Working with Python libraries and writing functions
Introduction to python libraries: NumPy, Pandas, Matplotlib, importing libraries.
Data visualization using Matplotlib library, plotting graphs: line plot, bar chart,
scatter plot.
NumPy and Pandas datatypes, basic operations: create, access, slice, add and
remove, reshape, indexing.
Introduction to user-defined functions: parameters, scope of variables, passing
parameters, void functions, functions returning values, invoking functions, lambda
function, passing list, tuple, dictionary as a function parameters.
6. Reference material (Books)
1. Mckinney, W. (2017). Python for Data Analysis. Second edition,
O’reilly (SPD)
2. VanderPlas, J. (2016). Python Data Science Handbook: Essential Tools
for Working with Data. Second edition, O’reilly (SPD).
3. Guttag, J. V. (2013). Introduction to computation and programming
using Python. MIT Press.
4. Liang, Y. D. (2013). Introduction to Programming using Python.
Pearson.
5. T. Budd, Exploring Python, TMH, 1st Ed, 2011
6. Urban, M. & Murach, J. (2018). Python Programming. Shroff
7. Reference material (Tutorials)
Python Tutorial by Python Developers
https://docs.python.org/3/tutorial/index.html
Python Tutorial by Tutorial Point
https://www.tutorialspoint.com/python/index.htm
Introduction to Python by W3Schools
https://www.w3schools.com/python/python_intro.asp
Python Practice Challenge by Hacker-rank
https://www.hackerrank.com/domains/python
8. Introduction to Programming
Language
Programming Language
Python Programming
Bits, Bytes, MB, GB, TB, PB, EB, ZB, YB
Number System-Binary, OD, D, HD
9. Programming Language (PL)
To communicate with a person, we need a specific language (to share ideas, opinions with each other), similarly,
to communicate with computers, programmers also need a language is called Programming language.
It is a set of instructions written in any specific language ( C, C++, Java, Python) to perform a specific task.
Types of programming languages
Low-Level PLs– machine code in 0s and 1s
Machine Language – machine code in binary or hexadecimal
Assembly Language - symbolic and human-understandable form, uses assembler to convert from assembly
language to machine language
High-Level PLs-requires a compiler or interpreter to translate the program into machine language
Procedural Oriented PLs – structure program to solve a specific task (e.g. C, Pascal, ALGOL, COBOL,
BASIC)
Object Oriented PLs - programs are divided into small parts called objects (e.g. C++, Java, Python, C#)
10. Registers
Register in computer: Fastest type of memory, located within the CPU, used for storing
temporary data and CPU instructions.
The size of a register maybe 8, 16, 32, or 64 bits. In 32-bit CPU, each register is 32 bits wide
and it can manipulate 32 bits of data at a time. The modern PCs have 32-bit or 64-bit registers
and are referred to as 32-bit processors and 64-bit processors.
11. Computer Memory
Computer Memory is the hardware part of the system which stores data, information, and
instructions.
Tabular Representation of
Various Memory Sizes
Name Equal To
Bit 1 Bit
Nibble 4 Bits
Byte 8 Bits
Kilobyte 1024 Bytes
Megabyte 1, 024 Kilobytes
Gigabyte 1, 024 Megabytes
Terrabyte 1, 024 Gigabytes
Petabyte 1, 024 Terabytes
Exabyte 1, 024 Petabytes
Zettabyte 1, 024 Exabytes
Yottabyte 1, 024 Zettabytes
12. Number System
The number system is a structured way of
representing numbers.
Different types of number systems
Decimal (Base 10 – 0, 1, 2, 3, 4, 5, 6, 7, 8, 9)
Binary (Base 2 – 0, 1)
Octal (Base 8 – 0, 1, 2, 3, 4, 5, 6, 7)
Hexadecimal (Base 16 –
0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F; where
A=10, B=11, ..., F=15)
Conversion Between Number Systems
1. Decimal to Binary:
i. Divide the decimal number by 2.
ii. Record the remainder (either 0 or 1).
iii. Repeat until the quotient is 0.
iv. The binary equivalent is the sequence of
remainders read from bottom to top.
2. Binary to Hexadecimal:
i. Group the binary digits into sets of four,
starting from the right.
ii. Convert each group to its hexadecimal
equivalent.
3. Decimal to Hexadecimal:
i. Convert the decimal number to binary.
ii. Convert the binary number to
hexadecimal.
13. What is Python?
Python is a high-level, interpreted
programming language known for its
simplicity and readability. It's versatile and can
be used for various applications such as web
development, data analysis, machine learning,
scientific computing, and more.
14. History of Python
Origin: Python was created by Guido van Rossum during 1985-1990
and first released in 1991.
Philosophy: Python's design philosophy emphasizes code readability,
and its syntax allows programmers to express concepts in fewer lines
of code than languages like C++ or Java.
Versions: Over the years, several versions of Python have been
released. The two main versions in use today are Python 2 in 2000 and
Python 3 in 2008, with Python 3 being the most recent and
recommended version. We will be using 3.12.1
15. Why Learn Python?
Versatility: Python can be used for various purposes, from web
development to data analysis and machine learning.
Readability: Python's syntax is designed to be clear and concise,
making it easier for beginners to understand and write code.
Community Support: Python has a large and active community, which
means plenty of resources, libraries, and frameworks are available.
Career Opportunities: Python skills are in high demand in the tech
industry, offering numerous job opportunities and competitive salaries.
16. Features of Python
Interpreted Language: Python code is executed line by line, making it
easier to debug and test.
Object-Oriented: Python supports object-oriented programming, allowing
for the creation of reusable and organized code.
Dynamic Typing: Variables in Python are dynamically typed, meaning
you don't need to declare a variable's type explicitly.
Rich Standard Library: Python comes with a comprehensive standard
library that provides modules and functions for various tasks, reducing
the need for external libraries.
17. Python vs Other Languages
Comparison with C/C++: Python offers higher-level
abstractions and a more concise syntax compared to
languages like C/C++, making it easier to write and
maintain code.
Comparison with Java: While Java is also a versatile
language, Python's simplicity and readability give it an
edge for rapid development and prototyping.
18. Setting Up Python Environment
Installation
IDEs (Integrated Development
Environments)
Editors
Command Prompt
43. Variables or Naming
Conventions
A Python identifier is a name used to
identify a variable, function, class, module
or other object. An identifier starts with a
letter A to Z or a to z or an underscore (_)
followed by zero or more letters,
underscores and digits (0 to 9).
Python does not allow punctuation
characters such as @, $, and % within
identifiers.
Python is case sensitive.
44. Reserved Keywords
and as assert
break class continue
def del elif
else except False
finally for from
global if import
in is lambda
None nonlocal not
or pass raise
return True try
while with yield
46. Arithmetic
Operators
+ for addition
- for subtraction
* for multiplication
/ for division
// for floor division
% for remainder
** for exponentiation
47. Comparison
Operators
== for equality check
!= for not equal
> for greater than
< for less than
>= for greater than or equal to
<= for less than or equal to
48. Assignment
Operators
= for assigning right value into left variable
A @= B
Let @ be the operation of A and B then A = A @ B and
@ {+, -, *, /, //, %, **, &, ^, |}
49. Logical
Operators
Compare True and False Boolean values
and if both are True will give True otherwise False
or if both are False will give False otherwise True
not (unitary operator – used with a single variable) if
given value if False returns True otherwise returns False