Homepage | About | Codes Used | Research ๐๐ ด๐ ฟ๐ พ๐๐ ธ๐๐ พ๐๐
๐๐ ด๐ ด๐ บ๐ ป๐ ๐๐ ด๐ ต๐ ป๐ ด๐ ฒ๐๐ ธ๐ ๐ ด ๐ น๐ พ๐๐๐ ฝ๐ ฐ๐ ป
Week 3: Python
What is?
Here is a definition from the Python website: โPython is an interpreted, object-oriented, high-level programming language with dynamic semantics.โ It has been around for 25 years and it has become the language of choice for many large organisations, including Google, Yahoo, and IBM because of its power, simplicity, and complete object model. In addition to other paradigms, Python also supports both procedural and object-oriented programming approaches.
Reasons to Learn Python?
- Easy to read and learn.
- Big open source and has the newest trends
- User friendly for both the bginners and the experts
- Big libraries for many things; just about evrything
- Great for validating ideas
What Can You Do with Python?
- Web Development ย - You can create web applications with different levels of complexity. ย Flask, Pyramid and Django are a few of the excellent Python web frameworks but there are a lot more.
- Data Analysis - Many data scientists opt for this language because of the excellent available libraries like data visualisation
- Machine Learning - Imagine if you can predict or analyse stocks or customer satisfaction then you can make a more guided business decision. ย This is made possible with a wide array of library that implements machine learning algorithm.
- Computer Vision - You can create interesting things like face and colour detection with the use of Opencv and Python.
- Game Development - Earn while you play! Create a video game using Pygame module where you navigate Python when writing the game logic.
- Web Scraping - This is done when there are data from a website that you need to take data from but the site canโt show the info because it has no API. Python is used to scrape data.
- Script Writing - Done when you want to automate repetitive kinds of stuff.
- Browser Automation - is the process of conducting operations on a web browser automatically such as posting a status on Facebook or opening a web browser.
- GUI Development - Develop a desktop app known as GUI Application using Python
*All you need is the desire and the willingness to learn*
Reference:
Python Programming for Beginners (3.56 mins)
What is Python Used For? (3.57 mins)
BUILT-IN DATA TYPES
CATEGORYย ย ย ย ย | NAME ย ย ย ย ย | DESCRIPTION |
---|---|---|
ย | ย | ย |
None | None | It is a null object |
Numeric | int | This is an integer dta type. |
ย | float | This data type can store a floating-point number (ie. 1.5) |
ย | complex | It stores complex number; written in the form , x+yj, where x is the real part and y is the imaginary part |
ย | bool | a Boolean type which returns to true or False |
Sequences | str | use to store a string of alpha characters |
ย | liXst | can store a list of arbitrary objects. |
ย | Tuple | can store a group of arbitrary items in order and unchangeable. |
ย | range | use to create a range of integers; returns a sequence of numbers, starting from 0 by default, and increments by 1 (by default), and stops before a specified number. |
Mapping | dict | a dictionary data type that stores data in key:value pairs. |
ย | set | a mutable (can be changed) and unordered collection of unique items. |
ย | frozenset | collection of unique items that are immutable (unchangeable). |
Phyton Data Types
Exampleย ย ย ย ย | Data Type |
---|---|
x = str(โHello Worldโ) | str |
x = int(20) | int |
x = float(20.5) | float |
x = complex(1j) | complex |
x = list((โappleโ, โbananaโ, โcherryโ)) | list |
x = tuple((โappleโ, โbananaโ, โcherryโ)) | tuple |
x = range(6) | range |
x = dict(name=โJohnโ, age=36 | dict |
x = set((โappleโ, โbananaโ, โcherryโ)) | set |
x = frozenset((โappleโ, โbananaโ, โcherryโ)) | frozenset |
x = bool(5) | bool |
x = byte(5) | bytes |
x = bytearray(5) | bytearray |
x = memoryview(bytes(5)) | memoryview |
๐๐ ด๐ ต๐ ป๐ ด๐ ฒ๐๐ ธ๐ พ๐ ฝ:
Iโve enjoyed the water, perhaps, I can explore and have more fun.ย Introduction to the programming language, Python.ย Just the word itself, I hate it! Hearing it jumpscare me as I can imagine the slimy-looking scales that give me goosebumps.ย Willย the โPythonโ be the same python, Iโm dreading?
I was able to understand the discussion, the function and the data types but, as we go along with the coding, I am lost.ย Whatโs happening? Why did Sarmad use parenthesis and the quotation mark?ย I am listening to the discussion but my brain is all twisted and going somewhere.ย Is Sarmad speaking in an alien language?ย
Thank God, the discussion is over.ย I appreciate Sarmadโs lecture. I know I understood it but I feel like Iโm drowning in the water. Iโm struggling but I am doing my best to survive. I know I will be able to get out of the water, with a brand new skill that I will carry with me forever.