diff --git a/.gitignore b/.gitignore index b37318f..58f5914 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ build/ env/ .DS_Store +.vscode \ No newline at end of file diff --git a/README.md b/README.md index a938e87..3f252ea 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,17 @@ # studi.my: 101 Beginning Python + The curriculum for studi.my: Beginning Python -This is the curriculum material to learn basic Python programming. +This is the syllabus for studi.my's basic Python programming. Table Of Contents: -- Introduction -- Data Types -- Variables, Statement & Expression -- Flow Control -- Functions -- String Manipulation -- Summary +- Introduction +- Data Types +- Variables, Statement & Expression +- Control Flow +- Functions +- String Manipulation +- Summary ## Copyright and licenses @@ -24,7 +25,8 @@ Licensed under the Creative Commons Attribution 4.0 International Public License Before you can build the documentation, you'll need to have Sphinx on you system. We suggest that you do it witihin a virtualenv, like so: -``` + +```bash $ virtualenv -p python3 $HOME/py3 $ $HOME/py3/activate $ which pip @@ -34,6 +36,4 @@ $ pip install Sphinx ### Create html pages -``` -$ make html -``` +`$ make html` diff --git a/source/data_types/index.rst b/source/data_types/index.rst index c774589..9b13213 100644 --- a/source/data_types/index.rst +++ b/source/data_types/index.rst @@ -3,11 +3,11 @@ Data Types =========== The Bigger Picture ------------------- -As you know, everything in a computer is represented as **1s and 0s**. If you are not sure how computer works, -we highly recommend you to watch `this interactive video `_. +As you may know, everything in a computer is represented as **1s and 0s**. If you are not sure how computers work, +we highly recommend that you watch `this interactive video `_. -In this topic, we explore **why we need Data Types**. Key question is, if a computer only -understands binary (1s and 0s), how does a human communicates with it? +In this topic, we explore **why we need Data Types**. The key question is, if a computer only +understands binary digits (1s and 0s), how can humans communicate with it? Syntax and Semantics - Learning Python Grammar ---------------------------------------------- @@ -42,8 +42,8 @@ Now try this in IDLE. .. topic:: FAQ / Common Issues - | 1. Help ! I got bunch of errors typing stuff inside ``type()`` built-in function. - | It's okay! Try to read and make sense the errors shown. Part of learning is to learn how to read error stack. + | 1. Help! I got bunch of errors when typing stuff inside the ``type()`` built-in function. + | It's okay! Try to read and make sense the errors shown. Part of learning how to code is learning how to read the error stack. | 2. How can I possibly know all the built-in functions and data types in Python? | Refer to :ref:`Quick Resources ` for all the built-in functions and data types available in Python. @@ -52,23 +52,24 @@ Critical Thinking - Discussions -------------------------------- 1. What other types you found besides the common ``int``, ``float``, ``str``, ``bool``, ``None`` type ? 2. Can you type in Chinese or other languages ? What type is it? -3. If everything in computer is represented by 1s and 0s, how does it represent:- +3. If everything in computer is represented by 1s and 0s, how does it represent: * 10 * 3.1243 * "hello world" * "你好" + 4. Can you imagine how images, files, sounds and other inputs get represented in Python? 5. Can you appreciate the value of having data types now ? 6. Can you think of other data types which needs to be represented ? .. topic:: Fun Facts - Variables ``num1`` and ``num2`` above are intuitive to us cause we learnt them in Math class. It's simple algebra! + Variables ``num1`` and ``num2`` above are intuitive to us because we learnt them in Math class. It's simple algebra! Best Practices --------------- -1. You might already notice by now Python has its documentation stored at https://docs.python.org/3/ +1. You might have already noticed by now that Python has its documentation stored at https://docs.python.org/3/ Remember -------- diff --git a/source/flow_control/index.rst b/source/flow_control/index.rst index 449a79a..45da052 100644 --- a/source/flow_control/index.rst +++ b/source/flow_control/index.rst @@ -1,9 +1,9 @@ ============ -Flow Control +Control Flow ============ The Bigger Picture ------------------ -Program executes from top-down approach but what if you want to take control of how it flows? +Programs execute from a top-down approach but what if you want to take control of how it flows? This topic focuses on Python control flow statements. @@ -41,7 +41,7 @@ Explore on your own to try the grasp how these flow statements work. Open up IDL ... print("b is the youngest!") ... else: ... print("c is the youngest!") - + Critical Thinking - Discussions ------------------------------- 1. How do you form a condition ? diff --git a/source/function/index.rst b/source/function/index.rst index 3553144..5ffb94d 100644 --- a/source/function/index.rst +++ b/source/function/index.rst @@ -3,7 +3,7 @@ Functions ========= The Bigger Picture ------------------ -Problem solving is about **breaking down problem into mind-size bites** - decomposing. Function allows us to essentially do +Problem solving is about **breaking down problems into bite-sized pieces** - or rather, decomposing. Function allows us to essentially do just that - divide the code into smaller chunks. What comes to mind when it comes to ``functions`` ? Hint: You learn it in school! diff --git a/source/index.rst b/source/index.rst index 43fb0fc..c30bb89 100644 --- a/source/index.rst +++ b/source/index.rst @@ -15,23 +15,23 @@ What You Will Learn .. topic:: Idea #1 - Data Types - How does human interacts with machine if it only understands 1s and 0s ? Data types allow help to represent numbers, strings, etc in human readable manner. Learn some of the basics built-in data types in Python. + How do humans interact with machines if it only understands 1s and 0s? Data types allow us to represent numbers, strings, etc in human readable manner. Learn some of the basic built-in data types in Python. -.. topic:: Idea #2 - Variable, Statement and Expression +.. topic:: Idea #2 - Variables, Statements and Expressions - Program needs a mechanism to "remember" instructions. Here is where you'll learn how to do it and the difference type of instructions - statements vs expressions. + A program needs a mechanism to "remember" instructions. Here is where you'll learn how to do it and the different types of instructions - statements vs expressions. -.. topic:: Idea #3 - Flow Control +.. topic:: Idea #3 - Control Flow - Program executes from top-down approach but what if you want to take control of how it flows? Conditional statement is one approach. Learn about using various operators to form conditions. + A program executes instructions from a top-down approach, but what if you wanted to take control of how it flows? Conditional statement is one approach. Learn about using various operators to form conditions. .. topic:: Idea #4 - Function - Function is the core idea of breaking down problem into mind-size bite. Get an idea of how program works with function - input, process, output. + Functions are a core idea of breaking down problems into bite-sized pieces. Get an idea of how a program works with functions - input, process, output. .. topic:: Idea #5 - String Manipulations - Strings in Python is very powerful - all symbols you can think of like Chinese, Arabic and even emojis can be represented as String in Python. Explore the built-in methods and other tricks to manipulate data in Strings. + Strings in are very powerful in Python - all the symbols you can think of, even Chinese or Arabic characters, and even emojis can be represented as Strings in Python. Explore the built-in methods and other tricks to manipulate Strings in Python. .. toctree:: :maxdepth: 2 diff --git a/source/introduction/index.rst b/source/introduction/index.rst index 44c82d1..5c1b36d 100644 --- a/source/introduction/index.rst +++ b/source/introduction/index.rst @@ -1,16 +1,17 @@ ============ Introduction ============ -There are two main topics for understanding programming:- -1. Environment - the part that's installed on the computer/machine -2. Language - the part that's installed in the programmer's head +There are two main topics for understanding programming: -In order to learn effectively, this course will:- +1. Environment - the part installed on the computer/machine. +2. Language - the part installed in the programmer's head. -* Code in the Cloud - we will NOT go into Environment -* Focus on Problem Solving - break down problem into mind-size bites (decompose) -* Encourage critical thinking through questions / exploration (tinker on your own) +In order to learn effectively, this course will: + +* Code in the Cloud - we will NOT go into Environment. +* Focus on Problem Solving - break down problem into bite-sized pieces (decompose). +* Encourage critical thinking through questions/exploration (tinker on your own). Let's begin ! diff --git a/source/string_manipulation/index.rst b/source/string_manipulation/index.rst index dea7070..8b3097b 100644 --- a/source/string_manipulation/index.rst +++ b/source/string_manipulation/index.rst @@ -6,7 +6,7 @@ The Bigger Picture Python 3 strings are sequences of Unicode, not bytes. What is Unicode? Watch `this Tedx Talk `_. -So, what does it means if Python strings uses UTF-8 unicode encoding? +So, what does it mean if Python strings uses UTF-8 unicode encoding? Hint: Remember we asked earlier in **Data Types** topic how certain symbols like Chinese characters are represented in binary? Syntax and Semantics - Learning Python Grammar diff --git a/source/summary/index.rst b/source/summary/index.rst index a46a202..e6e0e01 100644 --- a/source/summary/index.rst +++ b/source/summary/index.rst @@ -4,7 +4,7 @@ Summary **Congratulations**, you have leveled up! By now, we hope you have experienced solving problems with Python. -You might have realized how easy for humans to solve it but extremely difficult to break down solutions into step-by-step instructions for machine to understand. +You might realize how easy it is for humans to do so but it is extremely difficult to break down solutions into step-by-step instructions for machines to understand. As you practice to solve more problems, you'll get better at it. Don't give up! diff --git a/source/variable_statement_expression/index.rst b/source/variable_statement_expression/index.rst index 62fa694..4a27a5a 100644 --- a/source/variable_statement_expression/index.rst +++ b/source/variable_statement_expression/index.rst @@ -1,9 +1,9 @@ -================================= -Variables, Statement & Expression -================================= +==================================== +Variables, Statements & Expressions +==================================== The Bigger Picture ------------------ -In a nutshell, a computer program takes an input, store some values in the memory, do some processing and output the results. +In a nutshell, a computer program takes an input, stores some value in memory, do some processing and finally outputs the result. Let's talk about storing values. How do you do that?