Durasi : 5 hari
Deskripsi:
Python merupakan bahasa pemrograman dengan syntak yang sederhana dan didukung oleh sekumpulan library yang sangat powerful, sehingga mudah dipelajari oleh pemula. Meskipun sederhana dan mudah dipelajari, Python banyak digunakan di bidang ilmiah terutama untuk eksplorasi data.
Training ini merupakan dasar atau pengantar pemrograman Python untuk pemula yang belum mempunyai pengalaman pemrograman. Materi yang dibahas meliputi tipe data, variable, flow control pencabangan dan perulangan, files, lists, dictionary, tuples, regex, network programs, web services, pemrograman berorientasi objek, dan akses database.
Prasyarat:
• Tidak ada prasyarat untuk training ini
Tinjauan Materi:
1. Why should you learn to write programs?
• Creativity and motivation
• Computer hardware architecture
• Understanding programming
• Words and sentences
• Conversing with Python
• Terminology: Interpreter and compiler
• Writing a program
• What is a program?
• The building blocks of programs
• What could possibly go wrong?
2. Variables, expressions, and statements
• Values and types
• Variables
• Variable names and keywords
• Statements
• Operators and operands
• Expressions
• Order of operations
• Modulus operator
• String operations
• Asking the user for input
• Comments
• Choosing mnemonic variable names
3. Conditional execution
• Boolean expressions
• Logical operators
• Conditional execution
• Alternative execution
• Chained conditionals
• Nested conditionals
• Catching exceptions using try and except
• Short-circuit evaluation of logical expressions
4. Functions
• Function calls
• Built-in functions
• Type conversion functions
• Math functions
• Random numbers
• Adding new functions
• Definitions and uses
• Flow of execution
• Parameters and arguments
• Fruitful functions and void functions
• Why functions?
5. Iteration
• Updating variables
• The while statement
• Infinite loops
• Finishing iterations with continue
• Definite loops using for
• Loop patterns
Counting and summing loops
Maximum and minimum loops
6. Strings
• A string is a sequence
• Getting the length of a string using len
• Traversal through a string with a loop
• String slices
• Strings are immutable
• Looping and counting
• The in operator
• String comparison
• String methods
• Parsing strings
• Format operator
7. Files
• Persistence
• Opening files
• Text files and lines
• Reading files
• Searching through a file
• Letting the user choose the file name
• Using try, except, and open
• Writing files
8. Lists
• A list is a sequence
• Lists are mutable
• Traversing a list
• List operations
• List slices
• List methods
• Deleting elements
• Lists and functions
• Lists and strings
• Parsing lines
• Objects and values
• Aliasing
• List arguments
9. Dictionaries
• Dictionary as a set of counters
• Dictionaries and files
• Looping and dictionaries
• Advanced text parsing
10. Tuples
• Tuples are immutable
• Comparing tuples
• Tuple assignment
• Dictionaries and tuples
• Multiple assignment with dictionaries
• The most common words
• Using tuples as keys in dictionaries
11. Regular expressions
• Character matching in regular expressions
• Extracting data using regular expressions
• Combining searching and extracting
• Escape character
12. Networked programs
• HyperText Transfer Protocol – HTTP
• The world’s simplest web browser
• Retrieving an image over HTTP
• Retrieving web pages with urllib
• Reading binary files using urllib
• Parsing HTML and scraping the web
• Parsing HTML using regular expressions
• Parsing HTML using BeautifulSoup
13. Using Web Services 155
• eXtensible Markup Language – XML
• Parsing XML
• Looping through nodes
• JavaScript Object Notation – JSON
• Parsing JSON
• Application Programming Interfaces
• Security and API usage
14. Object-oriented programming
• Managing larger programs
• Getting started
• Using objects
• Starting with programs
• Subdividing a problem
• Our first Python object
• Classes as types
• Object lifecycle
• Multiple instances
• Inheritance
15. Using Databases and SQL
• What is a database?
• Database concepts
• Database Browser for SQLite
• Creating a database table
• Structured Query Language summary
• Spidering Twitter using a database
• Basic data modeling
• Programming with multiple tables
• Constraints in database tables
• Retrieve and/or insert a record
• Storing the friend relationship
• Three kinds of keys
• Using JOIN to retrieve data
16. Visualizing data
• Building a Google map from geocoded data
• Visualizing networks and interconnections
• Visualizing mail data