
































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
An introduction to the python programming language, covering its history, features, and applications. It delves into the basics of python, including data types, variables, expressions, and control structures. The course covers a wide range of topics, from fundamental programming concepts to more advanced features like object-oriented programming, data structures, file handling, and the use of external libraries for tasks like natural language processing and machine learning. The document aims to equip learners with a solid foundation in python, enabling them to develop practical problem-solving skills and build real-world applications. With its comprehensive coverage and hands-on exercises, this course is suitable for both beginners and those looking to expand their programming expertise.
Typology: Lecture notes
1 / 40
This page cannot be seen from the preview
Don't miss anything!

































Dr. Mohammed Maree Associate Professor in Information Technology Faculty of Engineering & Information Technology Arab American University, Palestine
(^) This course provides an introduction to the Python programming language, with applications to practical problem-solving involving data manipulation and analysis. The first part of the class focuses on teaching the basics of the Python language. Topics covered are data structures (lists, tuples, dictionaries, sets), functions, files, and object-oriented language elements. In the second part of the course students learn to apply advanced language features and methodologies in combination with third-party libraries for scientific computation to develop real-world applications. (^) CLOs
(^) Working with Functions (^) Lambdas (^) Object Oriented Programming in Python (^) Creating Classes, class attributes, and class methods. (^) Creating objects (^) Python Data Structure (dictionary and list manipulation) (^) Files (reading and store data in files, files pointer using seek) (^) Debugging and Exception Handling (^) Exception class hierarchy (^) User-defined exceptions (^) Spacy and NLTK: Sentence Tokenization, words tokenization, part of speech tagging, and finding entities in the text.
(^) Regular Expression (searching using regex, password, email, urls, validation using regular expressions) (^) Text Cleansing (^) Intro. to Machine Learning in Python: Classification: (^) Naive Bayes (^) (Implementing a Simple Sentiment Analyzer) (^) Graphical User Interface Planning (^) Graphical frameworks (^) Creating a Graphical User Interface
(^) https://pypl.github.io/PYPL.html
(^) Google makes extensive use of Python in its web search systems. (^) The popular YouTube video sharing service is largely written in Python. (^) The Dropbox storage service codes both its server and desktop client software primarily in Python. (^) The Raspberry Pi single-board computer promotes Python as its educational language. (^) Maya, a powerful integrated 3D modeling and animation system, provides a Python scripting API. (^) Netflix and Yelp have both documented the role of Python in their software infrastructures. (^) Intel, Cisco, Hewlett-Packard, Seagate, Qualcomm, and IBM use Python for hardware testing.
(^) Python Virtual Machine (PVM) (^) Once your program has been compiled to byte code (or the byte code has been loaded from existing .pyc files), it is shipped off for execution to something generally known as the Python Virtual Machine.
(^) Arithmetic Operators: (^) Addition + (^) Subtraction – (^) Multiplication * (^) Division / (^) Floor Division // (^) Exponentiation ** (^) Reminder (Modulo) % y = a * x ** 2 + b * x + c y = ( a * ( x ** 2) ) + ( b * x) + c
(^) Print Function: Single and Double-Quoted Strings (^) print(' Welcome\nto\n\nPython! ‘) Welcome to Python!
(^) Print Function: Single and Double-Quoted Strings (^) print( 'this is a longer string, so we
split it over two lines’) this is a longer string, so we split it over two lines
(^) TRIPLE-QUOTED STRINGS (^) print('Display 'hi' in quotes’) Display 'hi' in quotes (^) print("""Display "hi" and ' bye' in quotes""") Display "hi" and ' bye' in quotes
(^) TRIPLE-QUOTED STRINGS (^) triple_quoted_string = """This is a triplequoted
... : string that spans two lines\nThis is a triplequoted ... : string that spans two lines""" (^) print(triple_quoted_string) This is a triplequoted ... : string that spans two lines This is a triplequoted ... : string that spans two lines
(^) Getting Input from the User (^) name = input("Please enter your name:\n") (^) age = int(input("Please enter your age:\n")) (^) print(name, " " , age) Please enter your name: Mohammed Maree Please enter your age: 39 Mohammed Maree 39
20
(^) Variables and Expressions: (^) A variable is used to bind a name to an object. A variable name refers to a particular object. (^) A variable name , such as x , is an identifier. Each identifier may consist of letters , digits and underscores (_) but may not begin with a digit. (^) Python is case sensitive , so number and Number are different identifiers because one begins with a lowercase letter and the other begins with an uppercase letter. (^) An expression is a line of code that can be reduced to a value number = 5 print ( type (number)) neg= number-* neg/= print ( type (neg))