SlideShare a Scribd company logo
Python in 30 minutes!*
Fariz Darari
* Recommended slide reading time unless otherwise specified
2
Not this python, unfortunately
3
But this Python!
4
But this Python!
Programming Language
5
But this Python!
Programming Language
Created in 1991 by Guido van Rossum
6
But this Python!
Cross Platform
Programming Language
Created in 1991 by Guido van Rossum
7
But this Python!
Programming Language
Freely Usable Even for Commercial UseCreated in 1991 by Guido van Rossum
Cross Platform
"Python is easy to use, powerful, and versatile, making it a great choice
for beginners and experts alike." โ€“ codeschool.com
8
print("Python" + " is " + "cool!")
print("Python" + " is " + "cool!")
"Python is easy to use, powerful, and versatile, making it a great choice
for beginners and experts alike." โ€“ codeschool.com
9
print("Python" + " is " + "cool!")
"Python is easy to use, powerful, and versatile, making it a great choice
for beginners and experts alike." โ€“ codeschool.com
10
public class Main {
public static void main(String[] args) {
System.out.println("Hello world!");
}
}
print("Python" + " is " + "cool!")
"Python is easy to use, powerful, and versatile, making it a great choice
for beginners and experts alike." โ€“ codeschool.com
11
public class Main {
public static void main(String[] args) {
System.out.println("Hello world!");
}
}
print("Hello world!")
"Python is easy to use, powerful, and versatile, making it a great choice
for beginners and experts alike." โ€“ codeschool.com
12
print("Python" + " is " + "cool!")
13
print("Python" + " is " + "cool!")
"Python is easy to use, powerful, and versatile, making it a great choice
for beginners and experts alike." โ€“ codeschool.com
Big names using Python
"Python is easy to use, powerful, and versatile, making it a great choice
for beginners and experts alike." โ€“ codeschool.com
14
print("Python" + " is " + "cool!")
Image Processing using Python
https://opencv.org/
"Python is easy to use, powerful, and versatile, making it a great choice
for beginners and experts alike." โ€“ codeschool.com
15
print("Python" + " is " + "cool!")
Game Development using Python
https://www.pygame.org
"Python is easy to use, powerful, and versatile, making it a great choice
for beginners and experts alike." โ€“ codeschool.com
16
print("Python" + " is " + "cool!")
Data Science using Python
https://matplotlib.org/
"Python is easy to use, powerful, and versatile, making it a great choice
for beginners and experts alike." โ€“ codeschool.com
17
print("Python" + " is " + "cool!")
Natural Language Processing (NLP) and Text Mining using Python
https://github.com/amueller/word_cloud
18
Let's now explore the Python universe!
How to install Python the Anaconda way
1. Download Anaconda (which includes Python):
https://www.anaconda.com/download/
2. Run the installer and follow the installation instructions
3. Run the Spyder editor and create your first Python program "helloworld.py"
19
Python Setup
โ€ข Variables store and give names to data values
โ€ข Data values can be of various types:
โ€ข int : -5, 0, 1000000
โ€ข float : -2.0, 3.14159
โ€ข bool : True, False
โ€ข str : "Hello world!", "K3WL"
โ€ข list : [1, 2, 3, 4], ["Hello", "world!"], [1, 2, "Hello"], [ ]
โ€ข And many more!
โ€ข In Python, variables do not have types!
โ€ข Data values are assigned to variables using "="
20
Variables and Data Types
x = 1 # this is a Python comment
x = x + 5
y = "Python" + " is " + "cool!"
21
Variables and Data Types in Real Life
22
Conditionals and Loops
โ€ข Cores of programming!
โ€ข Rely on boolean expressions which return either True or False
โ€ข 1 < 2 : True
โ€ข 1.5 >= 2.5 : False
โ€ข answer == "Computer Science" :
can be True or False depending on the value of variable answer
โ€ข Boolean expressions can be combined with: and, or, not
โ€ข 1 < 2 and 3 < 4 : True
โ€ข 1.5 >= 2.5 or 2 == 2 : True
โ€ข not 1.5 >= 2.5 : True
23
Conditionals and Loops
24
Conditionals: Generic Form
if boolean-expression-1:
code-block-1
elif boolean-expression-2:
code-block-2
(as many elif's as you want)
else:
code-block-last
25
Conditionals: Usia SIM (Driving license age)
age = 20
if age < 17:
print("Belum bisa punya SIM!")
else:
print("OK, sudah bisa punya SIM.")
26
Conditionals: Usia SIM dengan Input
age = int(raw_input("Usia: ")) # use input() for Python 3
if age < 17:
print("Belum bisa punya SIM!")
else:
print("OK, sudah bisa punya SIM.")
27
Conditionals: Grading
grade = int(raw_input("Numeric grade: "))
if grade >= 80:
print("A")
elif grade >= 65:
print("B")
elif grade >= 55:
print("C")
else:
print("E")
โ€ข Useful for repeating code!
โ€ข Two variants:
28
Loops
while boolean-expression:
code-block
for element in collection:
code-block
29
While Loops
while raw_input("Which is the best subject? ") != "Computer Science":
print("Try again!")
print("Of course it is!")
while boolean-expression:
code-block
So far, we have seen (briefly) two kinds of collections:
string and list
For loops can be used to visit each collection's element:
30
For Loops
for element in collection:
code-block
for chr in "string":
print(chr)
for elem in [1,3,5]:
print(elem)
Conditionals and Loops in Real Life
31
โ€ข Functions encapsulate (= membungkus) code blocks
โ€ข Why functions? Modularization and reuse!
โ€ข You actually have seen examples of functions:
โ€ข print()
โ€ข raw_input()
โ€ข Generic form:
32
Functions
def function-name(parameters):
code-block
return value
33
Functions: Celcius to Fahrenheit
def celsius_to_fahrenheit(celsius):
fahrenheit = celsius * 1.8 + 32.0
return fahrenheit
def function-name(parameters):
code-block
return value
34
Functions: Default and Named Parameters
def hello(name_man="Bro", name_woman="Sis"):
print("Hello, " + name_man + " & " + name_woman + "!")
>>> hello()
Hello, Bro & Sis!
>>> hello(name_woman="Lady")
Hello, Bro & Lady!
>>> hello(name_woman="Mbakyu",name_man="Mas")
Hello, Mas & Mbakyu!
โ€ข Code made by other people shall be reused!
โ€ข Two ways of importing modules (= Python files):
โ€ข Generic form: import module_name
import math
print(math.sqrt(4))
โ€ข Generic form: from module_name import function_name
from math import sqrt
print(sqrt(4))
35
Imports
Functions in Real Life
36
โ€ข String is a sequence of characters, like "Python is cool"
โ€ข Each character has an index
โ€ข Accessing a character: string[index]
x = "Python is cool"
print(x[10])
โ€ข Accessing a substring via slicing: string[start:finish]
print(x[2:6])
37
String
P y t h o n i s c o o l
0 1 2 3 4 5 6 7 8 9 10 11 12 13
>>> x = "Python is cool"
>>> "cool" in x # membership
>>> len(x) # length of string x
>>> x + "?" # concatenation
>>> x.upper() # to upper case
>>> x.replace("c", "k") # replace characters in a string
38
String Operations
P y t h o n i s c o o l
0 1 2 3 4 5 6 7 8 9 10 11 12 13
>>> x = "Python is cool"
>>> x.split(" ") 39
String Operations: Split
P y t h o n i s c o o l
0 1 2 3 4 5 6 7 8 9 10 11 12 13
P y t h o n
0 1 2 3 4 5
i s
0 1
c o o l
0 1 2 3
x.split(" ")
>>> x = "Python is cool"
>>> y = x.split(" ")
>>> ",".join(y) 40
String Operations: Join
P y t h o n , i s , c o o l
0 1 2 3 4 5 6 7 8 9 10 11 12 13
P y t h o n
0 1 2 3 4 5
i s
0 1
c o o l
0 1 2 3
",".join(y)
Strings in Real Life
41
โ€ข Working with data heavily involves reading and writing!
โ€ข Data come in two types:
โ€ข Text: Human readable, encoded in ASCII/UTF-8, example: .txt, .csv
โ€ข Binary: Machine readable, application-specific encoding,
example: .mp3, .mp4, .jpg
42
Input/Output
python
is
cool
43
Input
cool.txt
x = open("cool.txt", "r") # read mode
y = x.read() # read the whole
print(y)
x.close()
python
is
cool
44
Input
cool.txt
x = open("cool.txt", "r")
# read line by line
for line in x:
line = line.replace("n","")
print(line)
x.close()
python
is
cool
45
Input
cool.txt
x = open("C:UsersFarizcool.txt", "r") # absolute location
for line in x:
line = line.replace("n","")
print(line)
x.close()
46
Output
# write mode
x = open("carpe-diem.txt", "w")
x.write("carpendiemn")
x.close()
# append mode
x = open("carpe-diem.txt", "a")
x.write("carpendiemn")
x.close()
Write mode overwrites files,
while append mode does not overwrite files but instead appends at the end of the files' content
Input in Real Life
47
Output in Real Life
48
โ€ข If a string is a sequence of characters, then
a list is a sequence of items!
โ€ข List is usually enclosed by square brackets [ ]
โ€ข As opposed to strings where the object is fixed (= immutable),
we are free to modify lists (that is, lists are mutable).
49
Lists
x = [1, 2, 3, 4]
x[0] = 4
x.append(5)
print(x) # [4, 2, 3, 4, 5]
50
List Operations
>>> x = [ "Python", "is", "cool" ]
>>> x.sort() # sort elements in x
>>> x[0:2] # slicing
>>> len(x) # length of string x
>>> x + ["!"] # concatenation
>>> x[2] = "hot" # replace element at index 0 with "hot"
>>> x.remove("Python") # remove the first occurrence of "Python"
>>> x.pop(0) # remove the element at index 0
It is basically a cool way of generating a list
51
List Comprehension
[expression for-clause condition]
Example:
[i*2 for i in [0,1,2,3,4] if i%2 == 0]
[i.replace("o", "i") for i in ["Python", "is", "cool"] if len(i) >= 3]
โ€ข Like a list, but you cannot modify it (= immutable)
โ€ข Tuple is usually (but not necessarily) enclosed by parentheses ()
โ€ข Everything that works with lists, works with tuples,
except functions modifying the tuples' content
โ€ข Example:
52
Tuples
x = (0,1,2)
y = 0,1,2 # same as x
x[0] = 2 # this gives an error
List in Real Life
53
โ€ข As opposed to lists, in sets duplicates are removed and
there is no order of elements!
โ€ข Set is of the form { e1, e2, e3, ... }
โ€ข Operations include: intersection, union, difference.
โ€ข Example:
54
Sets
x = [0,1,2,0,0,1,2,2]
y = {0,1,2,0,0,1,2,2}
print(x)
print(y)
print(y & {1,2,3}) # intersection
print(y | {1,2,3}) # union
print(y - {1,2,3}) # difference
55
Dictionaries
โ€ข Dictionaries map from keys to values!
โ€ข Content in dictionaries is not ordered.
โ€ข Dictionary is of the form { k1:v1, k2:v2, k3:v3, ... }
โ€ข Example:
x = {"indonesia":"jakarta", "germany":"berlin","italy":"rome"}
print(x["indonesia"]) # get value from key
x["japan"] = "tokyo" # add a new key-value pair to dictionary
print(x) # {'italy': 'rome', 'indonesia': 'jakarta', 'germany': 'berlin', 'japan': 'tokyo'}
Dictionary in Real Life
56
โ€ข While in functions we encapsulate a set of instructions,
in classes we encapsulate objects!
โ€ข A class is a blueprint for objects, specifying:
โ€ข Attributes for objects
โ€ข Methods for objects
โ€ข A class can use other classes as a base
โ€ข Generic:
57
Classes
class class-name(base):
attribute-code-block
method-code-block
class Person:
def __init__(self, first, last):
self.firstname = first
self.lastname = last
def describe(self):
return self.firstname + " " + self.lastname
guido = Person("Guido","Van Rossum")
print(guido.describe())
58
Classes: Person
class class-name(base):
attribute-code-block
method-code-block
59
Classes: Person & Employee
class class-name(base):
attribute-code-block
method-code-block
# first add code for class Person here
class Employee(Person):
def __init__(self, first, last, staffnum):
Person.__init__(self, first, last)
self.staffnum = staffnum
def describe(self):
return self.lastname + ", " + str(self.staffnum)
guido = Employee("Guido", "Van Rossum", 123456)
print(guido.describe())
Class in Real Life
60
61
Lessons learned
62
What's next?
63
What's next? Keep learning!
https://stackoverflow.com/questions/tagged/python
https://docs.python.org
http://greenteapress.com/wp/think-python-2e/Python Official Documentation
Python on stackoverflow (QA website on programming)
Free Python e-book
64
Food pack is ready,
enjoy your journey!

More Related Content

What's hot (20)

Python Programming Language | Python Classes | Python Tutorial | Python Train... by Edureka!, has 48 slides with 5941 views.
Python Programming Language | Python Classes | Python Tutorial | Python Train...Python Programming Language | Python Classes | Python Tutorial | Python Train...
Python Programming Language | Python Classes | Python Tutorial | Python Train...
Edureka!
48 slidesโ€ข5.9K views
Variables & Data Types In Python | Edureka by Edureka!, has 26 slides with 3055 views.
Variables & Data Types In Python | EdurekaVariables & Data Types In Python | Edureka
Variables & Data Types In Python | Edureka
Edureka!
26 slidesโ€ข3.1K views
Introduction to the basics of Python programming (part 1) by Pedro Rodrigues, has 36 slides with 3502 views.
Introduction to the basics of Python programming (part 1)Introduction to the basics of Python programming (part 1)
Introduction to the basics of Python programming (part 1)
Pedro Rodrigues
36 slidesโ€ข3.5K views
Python : Functions by Emertxe Information Technologies Pvt Ltd, has 54 slides with 4498 views.
Python : FunctionsPython : Functions
Python : Functions
Emertxe Information Technologies Pvt Ltd
54 slidesโ€ข4.5K views
Python made easy by Abhishek kumar, has 225 slides with 4767 views.
Python made easy Python made easy
Python made easy
Abhishek kumar
225 slidesโ€ข4.8K views
Python Basics | Python Tutorial | Edureka by Edureka!, has 51 slides with 1860 views.
Python Basics | Python Tutorial | EdurekaPython Basics | Python Tutorial | Edureka
Python Basics | Python Tutorial | Edureka
Edureka!
51 slidesโ€ข1.9K views
Basic Concepts in Python by Sumit Satam, has 15 slides with 5194 views.
Basic Concepts in PythonBasic Concepts in Python
Basic Concepts in Python
Sumit Satam
15 slidesโ€ข5.2K views
FLOW OF CONTROL-INTRO PYTHON by vikram mahendra, has 16 slides with 1202 views.
FLOW OF CONTROL-INTRO PYTHONFLOW OF CONTROL-INTRO PYTHON
FLOW OF CONTROL-INTRO PYTHON
vikram mahendra
16 slidesโ€ข1.2K views
Python basics by RANAALIMAJEEDRAJPUT, has 37 slides with 3963 views.
Python basicsPython basics
Python basics
RANAALIMAJEEDRAJPUT
37 slidesโ€ข4K views
Python Tutorial | Python Tutorial for Beginners | Python Training | Edureka by Edureka!, has 74 slides with 6587 views.
Python Tutorial | Python Tutorial for Beginners | Python Training | EdurekaPython Tutorial | Python Tutorial for Beginners | Python Training | Edureka
Python Tutorial | Python Tutorial for Beginners | Python Training | Edureka
Edureka!
74 slidesโ€ข6.6K views
Python Basics by Pooja B S, has 14 slides with 494 views.
Python BasicsPython Basics
Python Basics
Pooja B S
14 slidesโ€ข494 views
Phython Programming Language by R.h. Himel, has 22 slides with 1996 views.
Phython Programming LanguagePhython Programming Language
Phython Programming Language
R.h. Himel
22 slidesโ€ข2K views
Overview of python 2019 by Samir Mohanty, has 199 slides with 1399 views.
Overview of python 2019Overview of python 2019
Overview of python 2019
Samir Mohanty
199 slidesโ€ข1.4K views
Python basics by Hoang Nguyen, has 30 slides with 2238 views.
Python basicsPython basics
Python basics
Hoang Nguyen
30 slidesโ€ข2.2K views
Introduction To Python | Edureka by Edureka!, has 35 slides with 1860 views.
Introduction To Python | EdurekaIntroduction To Python | Edureka
Introduction To Python | Edureka
Edureka!
35 slidesโ€ข1.9K views
Python Libraries and Modules by RaginiJain21, has 28 slides with 2893 views.
Python Libraries and ModulesPython Libraries and Modules
Python Libraries and Modules
RaginiJain21
28 slidesโ€ข2.9K views
Python functions by Prof. Dr. K. Adisesha, has 27 slides with 1109 views.
Python functionsPython functions
Python functions
Prof. Dr. K. Adisesha
27 slidesโ€ข1.1K views
Why Python? by Adam Pah, has 29 slides with 2037 views.
Why Python?Why Python?
Why Python?
Adam Pah
29 slidesโ€ข2K views
Pandas Series by Sangita Panchal, has 28 slides with 2127 views.
Pandas SeriesPandas Series
Pandas Series
Sangita Panchal
28 slidesโ€ข2.1K views
Introduction to Basics of Python by Elewayte, has 14 slides with 15948 views.
Introduction to Basics of PythonIntroduction to Basics of Python
Introduction to Basics of Python
Elewayte
14 slidesโ€ข15.9K views
Python Programming Language | Python Classes | Python Tutorial | Python Train... by Edureka!, has 48 slides with 5941 views.
Python Programming Language | Python Classes | Python Tutorial | Python Train...Python Programming Language | Python Classes | Python Tutorial | Python Train...
Python Programming Language | Python Classes | Python Tutorial | Python Train...
Edureka!
48 slidesโ€ข5.9K views
Variables & Data Types In Python | Edureka by Edureka!, has 26 slides with 3055 views.
Variables & Data Types In Python | EdurekaVariables & Data Types In Python | Edureka
Variables & Data Types In Python | Edureka
Edureka!
26 slidesโ€ข3.1K views
Introduction to the basics of Python programming (part 1) by Pedro Rodrigues, has 36 slides with 3502 views.
Introduction to the basics of Python programming (part 1)Introduction to the basics of Python programming (part 1)
Introduction to the basics of Python programming (part 1)
Pedro Rodrigues
36 slidesโ€ข3.5K views
Python Basics | Python Tutorial | Edureka by Edureka!, has 51 slides with 1860 views.
Python Basics | Python Tutorial | EdurekaPython Basics | Python Tutorial | Edureka
Python Basics | Python Tutorial | Edureka
Edureka!
51 slidesโ€ข1.9K views
Python Tutorial | Python Tutorial for Beginners | Python Training | Edureka by Edureka!, has 74 slides with 6587 views.
Python Tutorial | Python Tutorial for Beginners | Python Training | EdurekaPython Tutorial | Python Tutorial for Beginners | Python Training | Edureka
Python Tutorial | Python Tutorial for Beginners | Python Training | Edureka
Edureka!
74 slidesโ€ข6.6K views
Introduction To Python | Edureka by Edureka!, has 35 slides with 1860 views.
Introduction To Python | EdurekaIntroduction To Python | Edureka
Introduction To Python | Edureka
Edureka!
35 slidesโ€ข1.9K views
Introduction to Basics of Python by Elewayte, has 14 slides with 15948 views.
Introduction to Basics of PythonIntroduction to Basics of Python
Introduction to Basics of Python
Elewayte
14 slidesโ€ข15.9K views

Similar to Python in 30 minutes! (20)

05 python.pdf by SugumarSarDurai, has 91 slides with 246 views.
05 python.pdf05 python.pdf
05 python.pdf
SugumarSarDurai
91 slidesโ€ข246 views
Python by Shivam Gupta, has 42 slides with 43476 views.
PythonPython
Python
Shivam Gupta
42 slidesโ€ข43.5K views
Python Seminar PPT by Shivam Gupta, has 42 slides with 248213 views.
Python Seminar PPTPython Seminar PPT
Python Seminar PPT
Shivam Gupta
42 slidesโ€ข248.2K views
python-160403194316.pdf by gmadhu8, has 42 slides with 40 views.
python-160403194316.pdfpython-160403194316.pdf
python-160403194316.pdf
gmadhu8
42 slidesโ€ข40 views
Class 1: Welcome to programming by Marc Gouw, has 31 slides with 174 views.
Class 1: Welcome to programmingClass 1: Welcome to programming
Class 1: Welcome to programming
Marc Gouw
31 slidesโ€ข174 views
Python Introduction by Punithavel Ramani, has 42 slides with 164 views.
Python IntroductionPython Introduction
Python Introduction
Punithavel Ramani
42 slidesโ€ข164 views
Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be... by DRVaibhavmeshram1, has 172 slides with 69 views.
Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...
Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...
DRVaibhavmeshram1
172 slidesโ€ข69 views
Intro to Python by Daniel Greenfeld, has 61 slides with 5222 views.
Intro to PythonIntro to Python
Intro to Python
Daniel Greenfeld
61 slidesโ€ข5.2K views
Intro by Daniel Greenfeld, has 61 slides with 1631 views.
IntroIntro
Intro
Daniel Greenfeld
61 slidesโ€ข1.6K views
AI Machine Learning Complete Course: for PHP & Python Devs by Amr Shawqy, has 96 slides with 956 views.
AI Machine Learning Complete Course: for PHP & Python DevsAI Machine Learning Complete Course: for PHP & Python Devs
AI Machine Learning Complete Course: for PHP & Python Devs
Amr Shawqy
96 slidesโ€ข956 views
Charming python by Abu Ashraf Masnun, has 19 slides with 3381 views.
Charming pythonCharming python
Charming python
Abu Ashraf Masnun
19 slidesโ€ข3.4K views
Python slide by Kiattisak Anoochitarom, has 89 slides with 787 views.
Python slidePython slide
Python slide
Kiattisak Anoochitarom
89 slidesโ€ข787 views
Python 3 by Andrews Medina, has 71 slides with 1236 views.
Python 3Python 3
Python 3
Andrews Medina
71 slidesโ€ข1.2K views
Advanced Python Tutorial | Learn Advanced Python Concepts | Python Programmin... by Edureka!, has 36 slides with 2926 views.
Advanced Python Tutorial | Learn Advanced Python Concepts | Python Programmin...Advanced Python Tutorial | Learn Advanced Python Concepts | Python Programmin...
Advanced Python Tutorial | Learn Advanced Python Concepts | Python Programmin...
Edureka!
36 slidesโ€ข2.9K views
python presntation 2.pptx by Arpittripathi45, has 38 slides with 335 views.
python presntation 2.pptxpython presntation 2.pptx
python presntation 2.pptx
Arpittripathi45
38 slidesโ€ข335 views
Python for Penetration testers by Christian Martorella, has 27 slides with 11080 views.
Python for Penetration testersPython for Penetration testers
Python for Penetration testers
Christian Martorella
27 slidesโ€ข11.1K views
Python: The Dynamic! by Omid Mogharian, has 44 slides with 735 views.
Python: The Dynamic!Python: The Dynamic!
Python: The Dynamic!
Omid Mogharian
44 slidesโ€ข735 views
Python programming Workshop SITTTR - Kalamassery by SHAMJITH KM, has 150 slides with 4294 views.
Python programming Workshop SITTTR - KalamasseryPython programming Workshop SITTTR - Kalamassery
Python programming Workshop SITTTR - Kalamassery
SHAMJITH KM
150 slidesโ€ข4.3K views
Chapter1 python introduction syntax general by ssuser77162c, has 58 slides with 24 views.
Chapter1 python introduction syntax generalChapter1 python introduction syntax general
Chapter1 python introduction syntax general
ssuser77162c
58 slidesโ€ข24 views
Java Basics V3 by Sunil OS, has 67 slides with 841 views.
Java Basics V3Java Basics V3
Java Basics V3
Sunil OS
67 slidesโ€ข841 views
python-160403194316.pdf by gmadhu8, has 42 slides with 40 views.
python-160403194316.pdfpython-160403194316.pdf
python-160403194316.pdf
gmadhu8
42 slidesโ€ข40 views
Class 1: Welcome to programming by Marc Gouw, has 31 slides with 174 views.
Class 1: Welcome to programmingClass 1: Welcome to programming
Class 1: Welcome to programming
Marc Gouw
31 slidesโ€ข174 views
Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be... by DRVaibhavmeshram1, has 172 slides with 69 views.
Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...
Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...
DRVaibhavmeshram1
172 slidesโ€ข69 views
AI Machine Learning Complete Course: for PHP & Python Devs by Amr Shawqy, has 96 slides with 956 views.
AI Machine Learning Complete Course: for PHP & Python DevsAI Machine Learning Complete Course: for PHP & Python Devs
AI Machine Learning Complete Course: for PHP & Python Devs
Amr Shawqy
96 slidesโ€ข956 views
Advanced Python Tutorial | Learn Advanced Python Concepts | Python Programmin... by Edureka!, has 36 slides with 2926 views.
Advanced Python Tutorial | Learn Advanced Python Concepts | Python Programmin...Advanced Python Tutorial | Learn Advanced Python Concepts | Python Programmin...
Advanced Python Tutorial | Learn Advanced Python Concepts | Python Programmin...
Edureka!
36 slidesโ€ข2.9K views
Python programming Workshop SITTTR - Kalamassery by SHAMJITH KM, has 150 slides with 4294 views.
Python programming Workshop SITTTR - KalamasseryPython programming Workshop SITTTR - Kalamassery
Python programming Workshop SITTTR - Kalamassery
SHAMJITH KM
150 slidesโ€ข4.3K views
Chapter1 python introduction syntax general by ssuser77162c, has 58 slides with 24 views.
Chapter1 python introduction syntax generalChapter1 python introduction syntax general
Chapter1 python introduction syntax general
ssuser77162c
58 slidesโ€ข24 views

More from Fariz Darari (20)

Data X Museum - Hari Museum Internasional 2022 - WMID by Fariz Darari, has 32 slides with 161 views.
Data X Museum - Hari Museum Internasional 2022 - WMIDData X Museum - Hari Museum Internasional 2022 - WMID
Data X Museum - Hari Museum Internasional 2022 - WMID
Fariz Darari
32 slidesโ€ข161 views
[PUBLIC] quiz-01-midterm-solutions.pdf by Fariz Darari, has 9 slides with 133 views.
[PUBLIC] quiz-01-midterm-solutions.pdf[PUBLIC] quiz-01-midterm-solutions.pdf
[PUBLIC] quiz-01-midterm-solutions.pdf
Fariz Darari
9 slidesโ€ข133 views
Free AI Kit - Game Theory by Fariz Darari, has 35 slides with 1158 views.
Free AI Kit - Game TheoryFree AI Kit - Game Theory
Free AI Kit - Game Theory
Fariz Darari
35 slidesโ€ข1.2K views
Neural Networks and Deep Learning: An Intro by Fariz Darari, has 64 slides with 1342 views.
Neural Networks and Deep Learning: An IntroNeural Networks and Deep Learning: An Intro
Neural Networks and Deep Learning: An Intro
Fariz Darari
64 slidesโ€ข1.3K views
NLP guest lecture: How to get text to confess what knowledge it has by Fariz Darari, has 78 slides with 170 views.
NLP guest lecture: How to get text to confess what knowledge it hasNLP guest lecture: How to get text to confess what knowledge it has
NLP guest lecture: How to get text to confess what knowledge it has
Fariz Darari
78 slidesโ€ข170 views
Supply and Demand - AI Talents by Fariz Darari, has 10 slides with 269 views.
Supply and Demand - AI TalentsSupply and Demand - AI Talents
Supply and Demand - AI Talents
Fariz Darari
10 slidesโ€ข269 views
AI in education done properly by Fariz Darari, has 17 slides with 472 views.
AI in education done properlyAI in education done properly
AI in education done properly
Fariz Darari
17 slidesโ€ข472 views
Artificial Neural Networks: Pointers by Fariz Darari, has 44 slides with 1243 views.
Artificial Neural Networks: PointersArtificial Neural Networks: Pointers
Artificial Neural Networks: Pointers
Fariz Darari
44 slidesโ€ข1.2K views
Open Tridharma at ICACSIS 2019 by Fariz Darari, has 20 slides with 191 views.
Open Tridharma at ICACSIS 2019Open Tridharma at ICACSIS 2019
Open Tridharma at ICACSIS 2019
Fariz Darari
20 slidesโ€ข191 views
Defense Slides of Avicenna Wisesa - PROWD by Fariz Darari, has 34 slides with 190 views.
Defense Slides of Avicenna Wisesa - PROWDDefense Slides of Avicenna Wisesa - PROWD
Defense Slides of Avicenna Wisesa - PROWD
Fariz Darari
34 slidesโ€ข190 views
Seminar Laporan Aktualisasi - Tridharma Terbuka - Fariz Darari by Fariz Darari, has 31 slides with 224 views.
Seminar Laporan Aktualisasi - Tridharma Terbuka - Fariz DarariSeminar Laporan Aktualisasi - Tridharma Terbuka - Fariz Darari
Seminar Laporan Aktualisasi - Tridharma Terbuka - Fariz Darari
Fariz Darari
31 slidesโ€ข224 views
Foundations of Programming - Java OOP by Fariz Darari, has 100 slides with 311 views.
Foundations of Programming - Java OOPFoundations of Programming - Java OOP
Foundations of Programming - Java OOP
Fariz Darari
100 slidesโ€ข311 views
Recursion in Python by Fariz Darari, has 42 slides with 1854 views.
Recursion in PythonRecursion in Python
Recursion in Python
Fariz Darari
42 slidesโ€ข1.9K views
[ISWC 2013] Completeness statements about RDF data sources and their use for ... by Fariz Darari, has 40 slides with 95 views.
[ISWC 2013] Completeness statements about RDF data sources and their use for ...[ISWC 2013] Completeness statements about RDF data sources and their use for ...
[ISWC 2013] Completeness statements about RDF data sources and their use for ...
Fariz Darari
40 slidesโ€ข95 views
Testing in Python: doctest and unittest (Updated) by Fariz Darari, has 33 slides with 389 views.
Testing in Python: doctest and unittest (Updated)Testing in Python: doctest and unittest (Updated)
Testing in Python: doctest and unittest (Updated)
Fariz Darari
33 slidesโ€ข389 views
Testing in Python: doctest and unittest by Fariz Darari, has 33 slides with 562 views.
Testing in Python: doctest and unittestTesting in Python: doctest and unittest
Testing in Python: doctest and unittest
Fariz Darari
33 slidesโ€ข562 views
Dissertation Defense - Managing and Consuming Completeness Information for RD... by Fariz Darari, has 70 slides with 457 views.
Dissertation Defense - Managing and Consuming Completeness Information for RD...Dissertation Defense - Managing and Consuming Completeness Information for RD...
Dissertation Defense - Managing and Consuming Completeness Information for RD...
Fariz Darari
70 slidesโ€ข457 views
Research Writing - 2018.07.18 by Fariz Darari, has 56 slides with 797 views.
Research Writing - 2018.07.18Research Writing - 2018.07.18
Research Writing - 2018.07.18
Fariz Darari
56 slidesโ€ข797 views
KOI - Knowledge Of Incidents - SemEval 2018 by Fariz Darari, has 18 slides with 109 views.
KOI - Knowledge Of Incidents - SemEval 2018KOI - Knowledge Of Incidents - SemEval 2018
KOI - Knowledge Of Incidents - SemEval 2018
Fariz Darari
18 slidesโ€ข109 views
Comparing Index Structures for Completeness Reasoning by Fariz Darari, has 43 slides with 115 views.
Comparing Index Structures for Completeness ReasoningComparing Index Structures for Completeness Reasoning
Comparing Index Structures for Completeness Reasoning
Fariz Darari
43 slidesโ€ข115 views
Data X Museum - Hari Museum Internasional 2022 - WMID by Fariz Darari, has 32 slides with 161 views.
Data X Museum - Hari Museum Internasional 2022 - WMIDData X Museum - Hari Museum Internasional 2022 - WMID
Data X Museum - Hari Museum Internasional 2022 - WMID
Fariz Darari
32 slidesโ€ข161 views
Neural Networks and Deep Learning: An Intro by Fariz Darari, has 64 slides with 1342 views.
Neural Networks and Deep Learning: An IntroNeural Networks and Deep Learning: An Intro
Neural Networks and Deep Learning: An Intro
Fariz Darari
64 slidesโ€ข1.3K views
NLP guest lecture: How to get text to confess what knowledge it has by Fariz Darari, has 78 slides with 170 views.
NLP guest lecture: How to get text to confess what knowledge it hasNLP guest lecture: How to get text to confess what knowledge it has
NLP guest lecture: How to get text to confess what knowledge it has
Fariz Darari
78 slidesโ€ข170 views
Defense Slides of Avicenna Wisesa - PROWD by Fariz Darari, has 34 slides with 190 views.
Defense Slides of Avicenna Wisesa - PROWDDefense Slides of Avicenna Wisesa - PROWD
Defense Slides of Avicenna Wisesa - PROWD
Fariz Darari
34 slidesโ€ข190 views
Seminar Laporan Aktualisasi - Tridharma Terbuka - Fariz Darari by Fariz Darari, has 31 slides with 224 views.
Seminar Laporan Aktualisasi - Tridharma Terbuka - Fariz DarariSeminar Laporan Aktualisasi - Tridharma Terbuka - Fariz Darari
Seminar Laporan Aktualisasi - Tridharma Terbuka - Fariz Darari
Fariz Darari
31 slidesโ€ข224 views
[ISWC 2013] Completeness statements about RDF data sources and their use for ... by Fariz Darari, has 40 slides with 95 views.
[ISWC 2013] Completeness statements about RDF data sources and their use for ...[ISWC 2013] Completeness statements about RDF data sources and their use for ...
[ISWC 2013] Completeness statements about RDF data sources and their use for ...
Fariz Darari
40 slidesโ€ข95 views
Testing in Python: doctest and unittest (Updated) by Fariz Darari, has 33 slides with 389 views.
Testing in Python: doctest and unittest (Updated)Testing in Python: doctest and unittest (Updated)
Testing in Python: doctest and unittest (Updated)
Fariz Darari
33 slidesโ€ข389 views
Dissertation Defense - Managing and Consuming Completeness Information for RD... by Fariz Darari, has 70 slides with 457 views.
Dissertation Defense - Managing and Consuming Completeness Information for RD...Dissertation Defense - Managing and Consuming Completeness Information for RD...
Dissertation Defense - Managing and Consuming Completeness Information for RD...
Fariz Darari
70 slidesโ€ข457 views
KOI - Knowledge Of Incidents - SemEval 2018 by Fariz Darari, has 18 slides with 109 views.
KOI - Knowledge Of Incidents - SemEval 2018KOI - Knowledge Of Incidents - SemEval 2018
KOI - Knowledge Of Incidents - SemEval 2018
Fariz Darari
18 slidesโ€ข109 views
Comparing Index Structures for Completeness Reasoning by Fariz Darari, has 43 slides with 115 views.
Comparing Index Structures for Completeness ReasoningComparing Index Structures for Completeness Reasoning
Comparing Index Structures for Completeness Reasoning
Fariz Darari
43 slidesโ€ข115 views

Recently uploaded (20)

Oxford English for Aviation Book for students by tuyen nguyen, has 97 slides with 9 views.
Oxford English for Aviation Book for studentsOxford English for Aviation Book for students
Oxford English for Aviation Book for students
tuyen nguyen
97 slidesโ€ข9 views
Windows Movie Maker 2025 Crack + Registration Code Free Download by ca6725722, has 8 slides with 45 views.
Windows Movie Maker 2025 Crack + Registration Code Free DownloadWindows Movie Maker 2025 Crack + Registration Code Free Download
Windows Movie Maker 2025 Crack + Registration Code Free Download
ca6725722
8 slidesโ€ข45 views
VADY Converts Context into Scalable Business Innovation by NewFangledVision, has 1 slides with 8 views.
VADY Converts Context into Scalable Business InnovationVADY Converts Context into Scalable Business Innovation
VADY Converts Context into Scalable Business Innovation
NewFangledVision
1 slideโ€ข8 views
CIP Clonal Use Case 01 - In Vitro Inspections.pptx by Edwin Rojas, has 18 slides with 9 views.
CIP Clonal Use Case 01 - In Vitro Inspections.pptxCIP Clonal Use Case 01 - In Vitro Inspections.pptx
CIP Clonal Use Case 01 - In Vitro Inspections.pptx
Edwin Rojas
18 slidesโ€ข9 views
CSI SAP2000 Ultimate Crack 2025 Free Download by raoufsomroo2021kp, has 24 slides with 28 views.
CSI SAP2000 Ultimate Crack 2025 Free DownloadCSI SAP2000 Ultimate Crack 2025 Free Download
CSI SAP2000 Ultimate Crack 2025 Free Download
raoufsomroo2021kp
24 slidesโ€ข28 views
How Gamification Can Boost Engagement in Travel Apps by mohit579916, has 9 slides with 15 views.
How Gamification Can Boost Engagement in Travel AppsHow Gamification Can Boost Engagement in Travel Apps
How Gamification Can Boost Engagement in Travel Apps
mohit579916
9 slidesโ€ข15 views
Toon Boom Harmony Premium Crack Activation Key by raffayihan9, has 24 slides with 13 views.
Toon Boom Harmony Premium Crack Activation KeyToon Boom Harmony Premium Crack Activation Key
Toon Boom Harmony Premium Crack Activation Key
raffayihan9
24 slidesโ€ข13 views
Deploying to production with confidence ๐Ÿš€ by Andres Almiray, has 51 slides with 13 views.
Deploying to production with confidence ๐Ÿš€Deploying to production with confidence ๐Ÿš€
Deploying to production with confidence ๐Ÿš€
Andres Almiray
51 slidesโ€ข13 views
Wondershare Recoverit 13.0.1.6 Crack Free Download by jrehmani658, has 35 slides with 14 views.
Wondershare Recoverit 13.0.1.6 Crack Free DownloadWondershare Recoverit 13.0.1.6 Crack Free Download
Wondershare Recoverit 13.0.1.6 Crack Free Download
jrehmani658
35 slidesโ€ข14 views
AI/ML Infra Meetup | Deployment, Discovery and Serving of LLMs at Uber Scale by Alluxio, Inc., has 16 slides with 148 views.
AI/ML Infra Meetup | Deployment, Discovery and Serving of LLMs at Uber ScaleAI/ML Infra Meetup | Deployment, Discovery and Serving of LLMs at Uber Scale
AI/ML Infra Meetup | Deployment, Discovery and Serving of LLMs at Uber Scale
Alluxio, Inc.
16 slidesโ€ข148 views
Building Effective Web Portals with Claris FileMaker by DBServices1, has 26 slides with 15 views.
Building Effective Web Portals with Claris FileMakerBuilding Effective Web Portals with Claris FileMaker
Building Effective Web Portals with Claris FileMaker
DBServices1
26 slidesโ€ข15 views
LLM-based Multi-Agent Systems to Replace Traditional Software by Ivo Andreev, has 35 slides with 10 views.
LLM-based Multi-Agent Systems to Replace Traditional SoftwareLLM-based Multi-Agent Systems to Replace Traditional Software
LLM-based Multi-Agent Systems to Replace Traditional Software
Ivo Andreev
35 slidesโ€ข10 views
AIThe Rise of AI Twins: How Digital Twins Are Changing Business Strategy by asmith539880, has 12 slides with 19 views.
AIThe Rise of AI Twins: How Digital Twins Are Changing Business StrategyAIThe Rise of AI Twins: How Digital Twins Are Changing Business Strategy
AIThe Rise of AI Twins: How Digital Twins Are Changing Business Strategy
asmith539880
12 slidesโ€ข19 views
supermarket management system for students 1.pptx by aveshgopalJonnadula, has 14 slides with 13 views.
supermarket management system for students 1.pptxsupermarket management system for students 1.pptx
supermarket management system for students 1.pptx
aveshgopalJonnadula
14 slidesโ€ข13 views
7 Micro-Metrics That Predict Production Outages in Performance Labs Webinar by Tier1 app, has 37 slides with 119 views.
7 Micro-Metrics That Predict Production Outages in Performance Labs Webinar7 Micro-Metrics That Predict Production Outages in Performance Labs Webinar
7 Micro-Metrics That Predict Production Outages in Performance Labs Webinar
Tier1 app
37 slidesโ€ข119 views
GraphPad Prism Patch Crack [Latest] Free Download by shaidnawaz586, has 24 slides with 13 views.
GraphPad Prism Patch Crack [Latest] Free DownloadGraphPad Prism Patch Crack [Latest] Free Download
GraphPad Prism Patch Crack [Latest] Free Download
shaidnawaz586
24 slidesโ€ข13 views
SouJava - Blazingly Fast GenAI App Development With Java and Spring AI by Juarez Junior, has 35 slides with 20 views.
SouJava - Blazingly Fast GenAI App Development With Java and Spring AISouJava - Blazingly Fast GenAI App Development With Java and Spring AI
SouJava - Blazingly Fast GenAI App Development With Java and Spring AI
Juarez Junior
35 slidesโ€ข20 views
OSN-Blazingly Fast GenAI App Development With Java and Spring AI by Juarez Junior, has 35 slides with 27 views.
OSN-Blazingly Fast GenAI App Development With Java and Spring AIOSN-Blazingly Fast GenAI App Development With Java and Spring AI
OSN-Blazingly Fast GenAI App Development With Java and Spring AI
Juarez Junior
35 slidesโ€ข27 views
Advance Steel Addon for Autodesk AutoCAD Crack Free Download by raffayihan9, has 24 slides with 22 views.
Advance Steel Addon for Autodesk AutoCAD Crack Free DownloadAdvance Steel Addon for Autodesk AutoCAD Crack Free Download
Advance Steel Addon for Autodesk AutoCAD Crack Free Download
raffayihan9
24 slidesโ€ข22 views
Disk Drill Pro crack free software download by calewi5784, has 12 slides with 16 views.
Disk Drill Pro crack free software downloadDisk Drill Pro crack free software download
Disk Drill Pro crack free software download
calewi5784
12 slidesโ€ข16 views
Oxford English for Aviation Book for students by tuyen nguyen, has 97 slides with 9 views.
Oxford English for Aviation Book for studentsOxford English for Aviation Book for students
Oxford English for Aviation Book for students
tuyen nguyen
97 slidesโ€ข9 views
Windows Movie Maker 2025 Crack + Registration Code Free Download by ca6725722, has 8 slides with 45 views.
Windows Movie Maker 2025 Crack + Registration Code Free DownloadWindows Movie Maker 2025 Crack + Registration Code Free Download
Windows Movie Maker 2025 Crack + Registration Code Free Download
ca6725722
8 slidesโ€ข45 views
CIP Clonal Use Case 01 - In Vitro Inspections.pptx by Edwin Rojas, has 18 slides with 9 views.
CIP Clonal Use Case 01 - In Vitro Inspections.pptxCIP Clonal Use Case 01 - In Vitro Inspections.pptx
CIP Clonal Use Case 01 - In Vitro Inspections.pptx
Edwin Rojas
18 slidesโ€ข9 views
How Gamification Can Boost Engagement in Travel Apps by mohit579916, has 9 slides with 15 views.
How Gamification Can Boost Engagement in Travel AppsHow Gamification Can Boost Engagement in Travel Apps
How Gamification Can Boost Engagement in Travel Apps
mohit579916
9 slidesโ€ข15 views
Toon Boom Harmony Premium Crack Activation Key by raffayihan9, has 24 slides with 13 views.
Toon Boom Harmony Premium Crack Activation KeyToon Boom Harmony Premium Crack Activation Key
Toon Boom Harmony Premium Crack Activation Key
raffayihan9
24 slidesโ€ข13 views
Deploying to production with confidence ๐Ÿš€ by Andres Almiray, has 51 slides with 13 views.
Deploying to production with confidence ๐Ÿš€Deploying to production with confidence ๐Ÿš€
Deploying to production with confidence ๐Ÿš€
Andres Almiray
51 slidesโ€ข13 views
Wondershare Recoverit 13.0.1.6 Crack Free Download by jrehmani658, has 35 slides with 14 views.
Wondershare Recoverit 13.0.1.6 Crack Free DownloadWondershare Recoverit 13.0.1.6 Crack Free Download
Wondershare Recoverit 13.0.1.6 Crack Free Download
jrehmani658
35 slidesโ€ข14 views
AI/ML Infra Meetup | Deployment, Discovery and Serving of LLMs at Uber Scale by Alluxio, Inc., has 16 slides with 148 views.
AI/ML Infra Meetup | Deployment, Discovery and Serving of LLMs at Uber ScaleAI/ML Infra Meetup | Deployment, Discovery and Serving of LLMs at Uber Scale
AI/ML Infra Meetup | Deployment, Discovery and Serving of LLMs at Uber Scale
Alluxio, Inc.
16 slidesโ€ข148 views
Building Effective Web Portals with Claris FileMaker by DBServices1, has 26 slides with 15 views.
Building Effective Web Portals with Claris FileMakerBuilding Effective Web Portals with Claris FileMaker
Building Effective Web Portals with Claris FileMaker
DBServices1
26 slidesโ€ข15 views
LLM-based Multi-Agent Systems to Replace Traditional Software by Ivo Andreev, has 35 slides with 10 views.
LLM-based Multi-Agent Systems to Replace Traditional SoftwareLLM-based Multi-Agent Systems to Replace Traditional Software
LLM-based Multi-Agent Systems to Replace Traditional Software
Ivo Andreev
35 slidesโ€ข10 views
AIThe Rise of AI Twins: How Digital Twins Are Changing Business Strategy by asmith539880, has 12 slides with 19 views.
AIThe Rise of AI Twins: How Digital Twins Are Changing Business StrategyAIThe Rise of AI Twins: How Digital Twins Are Changing Business Strategy
AIThe Rise of AI Twins: How Digital Twins Are Changing Business Strategy
asmith539880
12 slidesโ€ข19 views
7 Micro-Metrics That Predict Production Outages in Performance Labs Webinar by Tier1 app, has 37 slides with 119 views.
7 Micro-Metrics That Predict Production Outages in Performance Labs Webinar7 Micro-Metrics That Predict Production Outages in Performance Labs Webinar
7 Micro-Metrics That Predict Production Outages in Performance Labs Webinar
Tier1 app
37 slidesโ€ข119 views
GraphPad Prism Patch Crack [Latest] Free Download by shaidnawaz586, has 24 slides with 13 views.
GraphPad Prism Patch Crack [Latest] Free DownloadGraphPad Prism Patch Crack [Latest] Free Download
GraphPad Prism Patch Crack [Latest] Free Download
shaidnawaz586
24 slidesโ€ข13 views
SouJava - Blazingly Fast GenAI App Development With Java and Spring AI by Juarez Junior, has 35 slides with 20 views.
SouJava - Blazingly Fast GenAI App Development With Java and Spring AISouJava - Blazingly Fast GenAI App Development With Java and Spring AI
SouJava - Blazingly Fast GenAI App Development With Java and Spring AI
Juarez Junior
35 slidesโ€ข20 views
OSN-Blazingly Fast GenAI App Development With Java and Spring AI by Juarez Junior, has 35 slides with 27 views.
OSN-Blazingly Fast GenAI App Development With Java and Spring AIOSN-Blazingly Fast GenAI App Development With Java and Spring AI
OSN-Blazingly Fast GenAI App Development With Java and Spring AI
Juarez Junior
35 slidesโ€ข27 views
Advance Steel Addon for Autodesk AutoCAD Crack Free Download by raffayihan9, has 24 slides with 22 views.
Advance Steel Addon for Autodesk AutoCAD Crack Free DownloadAdvance Steel Addon for Autodesk AutoCAD Crack Free Download
Advance Steel Addon for Autodesk AutoCAD Crack Free Download
raffayihan9
24 slidesโ€ข22 views
Disk Drill Pro crack free software download by calewi5784, has 12 slides with 16 views.
Disk Drill Pro crack free software downloadDisk Drill Pro crack free software download
Disk Drill Pro crack free software download
calewi5784
12 slidesโ€ข16 views

Python in 30 minutes!

  • 1. Python in 30 minutes!* Fariz Darari * Recommended slide reading time unless otherwise specified
  • 2. 2 Not this python, unfortunately
  • 3. 3 But this Python!
  • 4. 4 But this Python! Programming Language
  • 5. 5 But this Python! Programming Language Created in 1991 by Guido van Rossum
  • 6. 6 But this Python! Cross Platform Programming Language Created in 1991 by Guido van Rossum
  • 7. 7 But this Python! Programming Language Freely Usable Even for Commercial UseCreated in 1991 by Guido van Rossum Cross Platform
  • 8. "Python is easy to use, powerful, and versatile, making it a great choice for beginners and experts alike." โ€“ codeschool.com 8 print("Python" + " is " + "cool!")
  • 9. print("Python" + " is " + "cool!") "Python is easy to use, powerful, and versatile, making it a great choice for beginners and experts alike." โ€“ codeschool.com 9
  • 10. print("Python" + " is " + "cool!") "Python is easy to use, powerful, and versatile, making it a great choice for beginners and experts alike." โ€“ codeschool.com 10 public class Main { public static void main(String[] args) { System.out.println("Hello world!"); } }
  • 11. print("Python" + " is " + "cool!") "Python is easy to use, powerful, and versatile, making it a great choice for beginners and experts alike." โ€“ codeschool.com 11 public class Main { public static void main(String[] args) { System.out.println("Hello world!"); } } print("Hello world!")
  • 12. "Python is easy to use, powerful, and versatile, making it a great choice for beginners and experts alike." โ€“ codeschool.com 12 print("Python" + " is " + "cool!")
  • 13. 13 print("Python" + " is " + "cool!") "Python is easy to use, powerful, and versatile, making it a great choice for beginners and experts alike." โ€“ codeschool.com Big names using Python
  • 14. "Python is easy to use, powerful, and versatile, making it a great choice for beginners and experts alike." โ€“ codeschool.com 14 print("Python" + " is " + "cool!") Image Processing using Python https://opencv.org/
  • 15. "Python is easy to use, powerful, and versatile, making it a great choice for beginners and experts alike." โ€“ codeschool.com 15 print("Python" + " is " + "cool!") Game Development using Python https://www.pygame.org
  • 16. "Python is easy to use, powerful, and versatile, making it a great choice for beginners and experts alike." โ€“ codeschool.com 16 print("Python" + " is " + "cool!") Data Science using Python https://matplotlib.org/
  • 17. "Python is easy to use, powerful, and versatile, making it a great choice for beginners and experts alike." โ€“ codeschool.com 17 print("Python" + " is " + "cool!") Natural Language Processing (NLP) and Text Mining using Python https://github.com/amueller/word_cloud
  • 18. 18 Let's now explore the Python universe!
  • 19. How to install Python the Anaconda way 1. Download Anaconda (which includes Python): https://www.anaconda.com/download/ 2. Run the installer and follow the installation instructions 3. Run the Spyder editor and create your first Python program "helloworld.py" 19 Python Setup
  • 20. โ€ข Variables store and give names to data values โ€ข Data values can be of various types: โ€ข int : -5, 0, 1000000 โ€ข float : -2.0, 3.14159 โ€ข bool : True, False โ€ข str : "Hello world!", "K3WL" โ€ข list : [1, 2, 3, 4], ["Hello", "world!"], [1, 2, "Hello"], [ ] โ€ข And many more! โ€ข In Python, variables do not have types! โ€ข Data values are assigned to variables using "=" 20 Variables and Data Types x = 1 # this is a Python comment x = x + 5 y = "Python" + " is " + "cool!"
  • 21. 21 Variables and Data Types in Real Life
  • 22. 22 Conditionals and Loops
  • 23. โ€ข Cores of programming! โ€ข Rely on boolean expressions which return either True or False โ€ข 1 < 2 : True โ€ข 1.5 >= 2.5 : False โ€ข answer == "Computer Science" : can be True or False depending on the value of variable answer โ€ข Boolean expressions can be combined with: and, or, not โ€ข 1 < 2 and 3 < 4 : True โ€ข 1.5 >= 2.5 or 2 == 2 : True โ€ข not 1.5 >= 2.5 : True 23 Conditionals and Loops
  • 24. 24 Conditionals: Generic Form if boolean-expression-1: code-block-1 elif boolean-expression-2: code-block-2 (as many elif's as you want) else: code-block-last
  • 25. 25 Conditionals: Usia SIM (Driving license age) age = 20 if age < 17: print("Belum bisa punya SIM!") else: print("OK, sudah bisa punya SIM.")
  • 26. 26 Conditionals: Usia SIM dengan Input age = int(raw_input("Usia: ")) # use input() for Python 3 if age < 17: print("Belum bisa punya SIM!") else: print("OK, sudah bisa punya SIM.")
  • 27. 27 Conditionals: Grading grade = int(raw_input("Numeric grade: ")) if grade >= 80: print("A") elif grade >= 65: print("B") elif grade >= 55: print("C") else: print("E")
  • 28. โ€ข Useful for repeating code! โ€ข Two variants: 28 Loops while boolean-expression: code-block for element in collection: code-block
  • 29. 29 While Loops while raw_input("Which is the best subject? ") != "Computer Science": print("Try again!") print("Of course it is!") while boolean-expression: code-block
  • 30. So far, we have seen (briefly) two kinds of collections: string and list For loops can be used to visit each collection's element: 30 For Loops for element in collection: code-block for chr in "string": print(chr) for elem in [1,3,5]: print(elem)
  • 31. Conditionals and Loops in Real Life 31
  • 32. โ€ข Functions encapsulate (= membungkus) code blocks โ€ข Why functions? Modularization and reuse! โ€ข You actually have seen examples of functions: โ€ข print() โ€ข raw_input() โ€ข Generic form: 32 Functions def function-name(parameters): code-block return value
  • 33. 33 Functions: Celcius to Fahrenheit def celsius_to_fahrenheit(celsius): fahrenheit = celsius * 1.8 + 32.0 return fahrenheit def function-name(parameters): code-block return value
  • 34. 34 Functions: Default and Named Parameters def hello(name_man="Bro", name_woman="Sis"): print("Hello, " + name_man + " & " + name_woman + "!") >>> hello() Hello, Bro & Sis! >>> hello(name_woman="Lady") Hello, Bro & Lady! >>> hello(name_woman="Mbakyu",name_man="Mas") Hello, Mas & Mbakyu!
  • 35. โ€ข Code made by other people shall be reused! โ€ข Two ways of importing modules (= Python files): โ€ข Generic form: import module_name import math print(math.sqrt(4)) โ€ข Generic form: from module_name import function_name from math import sqrt print(sqrt(4)) 35 Imports
  • 36. Functions in Real Life 36
  • 37. โ€ข String is a sequence of characters, like "Python is cool" โ€ข Each character has an index โ€ข Accessing a character: string[index] x = "Python is cool" print(x[10]) โ€ข Accessing a substring via slicing: string[start:finish] print(x[2:6]) 37 String P y t h o n i s c o o l 0 1 2 3 4 5 6 7 8 9 10 11 12 13
  • 38. >>> x = "Python is cool" >>> "cool" in x # membership >>> len(x) # length of string x >>> x + "?" # concatenation >>> x.upper() # to upper case >>> x.replace("c", "k") # replace characters in a string 38 String Operations P y t h o n i s c o o l 0 1 2 3 4 5 6 7 8 9 10 11 12 13
  • 39. >>> x = "Python is cool" >>> x.split(" ") 39 String Operations: Split P y t h o n i s c o o l 0 1 2 3 4 5 6 7 8 9 10 11 12 13 P y t h o n 0 1 2 3 4 5 i s 0 1 c o o l 0 1 2 3 x.split(" ")
  • 40. >>> x = "Python is cool" >>> y = x.split(" ") >>> ",".join(y) 40 String Operations: Join P y t h o n , i s , c o o l 0 1 2 3 4 5 6 7 8 9 10 11 12 13 P y t h o n 0 1 2 3 4 5 i s 0 1 c o o l 0 1 2 3 ",".join(y)
  • 41. Strings in Real Life 41
  • 42. โ€ข Working with data heavily involves reading and writing! โ€ข Data come in two types: โ€ข Text: Human readable, encoded in ASCII/UTF-8, example: .txt, .csv โ€ข Binary: Machine readable, application-specific encoding, example: .mp3, .mp4, .jpg 42 Input/Output
  • 43. python is cool 43 Input cool.txt x = open("cool.txt", "r") # read mode y = x.read() # read the whole print(y) x.close()
  • 44. python is cool 44 Input cool.txt x = open("cool.txt", "r") # read line by line for line in x: line = line.replace("n","") print(line) x.close()
  • 45. python is cool 45 Input cool.txt x = open("C:UsersFarizcool.txt", "r") # absolute location for line in x: line = line.replace("n","") print(line) x.close()
  • 46. 46 Output # write mode x = open("carpe-diem.txt", "w") x.write("carpendiemn") x.close() # append mode x = open("carpe-diem.txt", "a") x.write("carpendiemn") x.close() Write mode overwrites files, while append mode does not overwrite files but instead appends at the end of the files' content
  • 47. Input in Real Life 47
  • 48. Output in Real Life 48
  • 49. โ€ข If a string is a sequence of characters, then a list is a sequence of items! โ€ข List is usually enclosed by square brackets [ ] โ€ข As opposed to strings where the object is fixed (= immutable), we are free to modify lists (that is, lists are mutable). 49 Lists x = [1, 2, 3, 4] x[0] = 4 x.append(5) print(x) # [4, 2, 3, 4, 5]
  • 50. 50 List Operations >>> x = [ "Python", "is", "cool" ] >>> x.sort() # sort elements in x >>> x[0:2] # slicing >>> len(x) # length of string x >>> x + ["!"] # concatenation >>> x[2] = "hot" # replace element at index 0 with "hot" >>> x.remove("Python") # remove the first occurrence of "Python" >>> x.pop(0) # remove the element at index 0
  • 51. It is basically a cool way of generating a list 51 List Comprehension [expression for-clause condition] Example: [i*2 for i in [0,1,2,3,4] if i%2 == 0] [i.replace("o", "i") for i in ["Python", "is", "cool"] if len(i) >= 3]
  • 52. โ€ข Like a list, but you cannot modify it (= immutable) โ€ข Tuple is usually (but not necessarily) enclosed by parentheses () โ€ข Everything that works with lists, works with tuples, except functions modifying the tuples' content โ€ข Example: 52 Tuples x = (0,1,2) y = 0,1,2 # same as x x[0] = 2 # this gives an error
  • 53. List in Real Life 53
  • 54. โ€ข As opposed to lists, in sets duplicates are removed and there is no order of elements! โ€ข Set is of the form { e1, e2, e3, ... } โ€ข Operations include: intersection, union, difference. โ€ข Example: 54 Sets x = [0,1,2,0,0,1,2,2] y = {0,1,2,0,0,1,2,2} print(x) print(y) print(y & {1,2,3}) # intersection print(y | {1,2,3}) # union print(y - {1,2,3}) # difference
  • 55. 55 Dictionaries โ€ข Dictionaries map from keys to values! โ€ข Content in dictionaries is not ordered. โ€ข Dictionary is of the form { k1:v1, k2:v2, k3:v3, ... } โ€ข Example: x = {"indonesia":"jakarta", "germany":"berlin","italy":"rome"} print(x["indonesia"]) # get value from key x["japan"] = "tokyo" # add a new key-value pair to dictionary print(x) # {'italy': 'rome', 'indonesia': 'jakarta', 'germany': 'berlin', 'japan': 'tokyo'}
  • 56. Dictionary in Real Life 56
  • 57. โ€ข While in functions we encapsulate a set of instructions, in classes we encapsulate objects! โ€ข A class is a blueprint for objects, specifying: โ€ข Attributes for objects โ€ข Methods for objects โ€ข A class can use other classes as a base โ€ข Generic: 57 Classes class class-name(base): attribute-code-block method-code-block
  • 58. class Person: def __init__(self, first, last): self.firstname = first self.lastname = last def describe(self): return self.firstname + " " + self.lastname guido = Person("Guido","Van Rossum") print(guido.describe()) 58 Classes: Person class class-name(base): attribute-code-block method-code-block
  • 59. 59 Classes: Person & Employee class class-name(base): attribute-code-block method-code-block # first add code for class Person here class Employee(Person): def __init__(self, first, last, staffnum): Person.__init__(self, first, last) self.staffnum = staffnum def describe(self): return self.lastname + ", " + str(self.staffnum) guido = Employee("Guido", "Van Rossum", 123456) print(guido.describe())
  • 60. Class in Real Life 60
  • 61. 61 Lessons learned
  • 62. 62 What's next?
  • 63. 63 What's next? Keep learning! https://stackoverflow.com/questions/tagged/python https://docs.python.org http://greenteapress.com/wp/think-python-2e/Python Official Documentation Python on stackoverflow (QA website on programming) Free Python e-book
  • 64. 64 Food pack is ready, enjoy your journey!

Editor's Notes

  • #2: http://www.unixstickers.com/stickers/coding_stickers/python-language-coding-badge-sticker https://creativecommons.org/licenses/
  • #3: African rock pythons are the largest species of snake in Africa.   PHOTOGRAPH BY JOEL SARTORE, NATIONAL GEOGRAPHIC PHOTO ARK https://emojiisland.com/pages/download-new-emoji-icons-in-png-ios-10
  • #4: https://gvanrossum.github.io/ https://www.iconfinder.com/icons/532716/api_coding_configuration_development_html_programming_window_icon#size=512 https://www.iconfinder.com/icons/314811/lock_open_icon#size=512 https://jumpcloud.com/daas-product/device-management/
  • #5: https://gvanrossum.github.io/ https://www.iconfinder.com/icons/532716/api_coding_configuration_development_html_programming_window_icon#size=512 https://www.iconfinder.com/icons/314811/lock_open_icon#size=512 https://jumpcloud.com/daas-product/device-management/
  • #6: https://gvanrossum.github.io/ https://www.iconfinder.com/icons/532716/api_coding_configuration_development_html_programming_window_icon#size=512 https://www.iconfinder.com/icons/314811/lock_open_icon#size=512 https://jumpcloud.com/daas-product/device-management/
  • #7: https://gvanrossum.github.io/ https://www.iconfinder.com/icons/532716/api_coding_configuration_development_html_programming_window_icon#size=512 https://www.iconfinder.com/icons/314811/lock_open_icon#size=512 https://jumpcloud.com/daas-product/device-management/
  • #8: https://gvanrossum.github.io/ https://www.iconfinder.com/icons/532716/api_coding_configuration_development_html_programming_window_icon#size=512 https://www.iconfinder.com/icons/314811/lock_open_icon#size=512 https://jumpcloud.com/daas-product/device-management/
  • #9: Why Python? Inspired from: https://www.codeschool.com/blog/2016/01/27/why-python/
  • #13: Powerful wrt influence (big companies are using it) Credits: https://www.theverge.com/2015/9/1/9239769/new-google-logo-announced https://commons.wikimedia.org/wiki/File:Netflix_2015_logo.svg https://www.underconsideration.com/brandnew/archives/new_identity_for_spotify_by_collins.php https://commons.wikimedia.org/wiki/File:Philips_logo_new.svg
  • #14: Powerful wrt influence (big companies are using it) Credits: https://www.theverge.com/2015/9/1/9239769/new-google-logo-announced https://commons.wikimedia.org/wiki/File:Netflix_2015_logo.svg https://www.underconsideration.com/brandnew/archives/new_identity_for_spotify_by_collins.php https://commons.wikimedia.org/wiki/File:Philips_logo_new.svg
  • #15: Credits: https://docs.opencv.org/master/dc/dd3/tutorial_gausian_median_blur_bilateral_filter.html
  • #16: Credits: https://cmlsc.itch.io/lollipop-ninja
  • #17: Credits: https://matplotlib.org/gallery/pyplots/whats_new_99_mplot3d.html#sphx-glr-gallery-pyplots-whats-new-99-mplot3d-py
  • #18: Credits: https://nlpforhackers.io/word-clouds/ http://www.nltk.org/
  • #19: python features utk text mining dan nlp: lists, loops, import, functions, list comprehension, strings slicing indexing, set, i/o Credits: https://docs.microsoft.com/en-us/media/common/i_get-started.svg https://emojiisland.com/products/snake-emoji-icon https://www.pexels.com/photo/sky-space-milky-way-stars-110854/
  • #22: https://www.pexels.com/photo/aroma-aromatic-assortment-bottles-531446/
  • #23: Shapes' meaning: https://support.office.com/en-us/article/create-a-basic-flowchart-e207d975-4a51-4bfa-a356-eeec314bd276 Sumber: https://www.bbc.co.uk/education/guides/z3bq7ty/revision/3
  • #32: https://www.pexels.com/photo/lights-high-colorful-ferris-wheel-40547/
  • #33: Modularization: So that your code can be better managed, unlike one huge program -> small functions, glued into one
  • #37: https://www.pexels.com/photo/amg-gt-automobile-automotive-button-498701/
  • #38: start: where we start taking the substring finish: the index one after we end the substring
  • #42: https://www.pexels.com/photo/alphabet-boogle-dice-enjoy-262529/ This Latin phrase, which literally means "pluck the day," was used by the Roman poet Horace to express the idea that we should enjoy life while we can. His full injunction, "carpe diem quam minimum credula postero,โ€ can be translated as โ€œpluck the day, trusting as little as possible in the next one,โ€ but carpe diem alone has come to be used as shorthand for this entire idea, which is more widely known as "seize the day."
  • #48: https://www.pexels.com/photo/long-blonde-haired-woman-eating-ice-cream-789694/
  • #49: https://www.pexels.com/photo/baby-child-close-up-crying-47090/
  • #52: [0, 4, 8] ['Pythin', 'ciil']
  • #54: https://www.pexels.com/photo/orange-and-green-pen-on-graphing-notepad-131979/
  • #57: https://www.pexels.com/photo/blur-book-close-up-data-270233/
  • #59: https://www.python-course.eu/python3_inheritance.php
  • #60: https://www.python-course.eu/python3_inheritance.php
  • #61: https://commons.wikimedia.org/wiki/File:Blauwdruk-Ronhaar.jpg 1923 blueprint for shophouse with bakery Ronhaar at the Hammerweg in Ommen, demolished in 2007; the almost flat upper part of the mansard roof is found in the central and eastern Netherlands, but is virtually unknown in the river area and in the southern part of the Netherlands.
  • #65: https://www.pexels.com/photo/baked-basket-blur-bread-350350/