From a6e7ee3037387ea2cafbf42288f21ea128ba97b2 Mon Sep 17 00:00:00 2001 From: xdvrx1 Date: Wed, 27 Jan 2021 09:30:48 +0800 Subject: [PATCH 01/27] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 21635ab..eee3bac 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Core Concepts of Computer Programming -Table of Contents +Table Of Contents 1. [Intro](#intro) 2. [Input / Output](#input-and-output) 1. [Hello World Program](#hello-world-program) From 85befc8ada87e219364f18fd1e08b04949085c51 Mon Sep 17 00:00:00 2001 From: xdvrx1 Date: Wed, 3 Feb 2021 16:05:51 +0800 Subject: [PATCH 02/27] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index eee3bac..ca699d6 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Core Concepts of Computer Programming -Table Of Contents +TOC 1. [Intro](#intro) 2. [Input / Output](#input-and-output) 1. [Hello World Program](#hello-world-program) From 173674429844d098754be97bd696d89786e7a582 Mon Sep 17 00:00:00 2001 From: jdevstatic Date: Thu, 21 Apr 2022 22:57:54 +0800 Subject: [PATCH 03/27] Delete LICENSE --- LICENSE | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 LICENSE diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 49681c9..0000000 --- a/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2020 xdvrx1 - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. From 6b9f31401f2bfa6e9fe0b85bd96c2058bd897a42 Mon Sep 17 00:00:00 2001 From: jdevstatic Date: Thu, 21 Apr 2022 22:58:18 +0800 Subject: [PATCH 04/27] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index ca699d6..f30b488 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Core Concepts of Computer Programming +`updated 21 March 2022` + TOC 1. [Intro](#intro) 2. [Input / Output](#input-and-output) From 78c1a4c0ad378616b806b9e41258a8c9e927bf8b Mon Sep 17 00:00:00 2001 From: jdevstatic Date: Thu, 21 Apr 2022 23:07:20 +0800 Subject: [PATCH 05/27] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f30b488..0a185ba 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Core Concepts of Computer Programming -`updated 21 March 2022` +*`updated 21 March 2022`* TOC 1. [Intro](#intro) From 1e2867ad0d3e6c827bf7b7e74669873e4c5090fa Mon Sep 17 00:00:00 2001 From: jdevstatic Date: Thu, 21 Apr 2022 23:30:14 +0800 Subject: [PATCH 06/27] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0a185ba..97fd594 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Core Concepts of Computer Programming -*`updated 21 March 2022`* + TOC 1. [Intro](#intro) From 88a712eac5a5f94b2cc6388ac0539caf7a8f4c15 Mon Sep 17 00:00:00 2001 From: jdevstatic Date: Thu, 21 Apr 2022 23:30:35 +0800 Subject: [PATCH 07/27] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 97fd594..6bf8029 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Core Concepts of Computer Programming - +*`updated 21 April 2022`* TOC 1. [Intro](#intro) From 938028b93d516a0a5146b8f862e49855e1818d50 Mon Sep 17 00:00:00 2001 From: jdevstatic Date: Fri, 22 Apr 2022 00:37:23 +0800 Subject: [PATCH 08/27] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 6bf8029..4bbd988 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ *`updated 21 April 2022`* +[![Hits](https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com%2Fjdevstatic%2Fprogramming-core-concepts&count_bg=%2379C83D&title_bg=%23555555&icon=&icon_color=%23E7E7E7&title=PAGE+VIEWS&edge_flat=false)](https://hits.seeyoufarm.com) + TOC 1. [Intro](#intro) 2. [Input / Output](#input-and-output) From 3a70e3ec058a6bb59a5a3d6a7edf1c0a7608065c Mon Sep 17 00:00:00 2001 From: jdevstatic Date: Sun, 28 May 2023 15:00:46 +0800 Subject: [PATCH 09/27] Update README.md --- README.md | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4bbd988..de2f407 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Core Concepts of Computer Programming -*`updated 21 April 2022`* +*`updated 28 May 2023`* [![Hits](https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com%2Fjdevstatic%2Fprogramming-core-concepts&count_bg=%2379C83D&title_bg=%23555555&icon=&icon_color=%23E7E7E7&title=PAGE+VIEWS&edge_flat=false)](https://hits.seeyoufarm.com) @@ -486,3 +486,21 @@ very hard to handle. If a function is generic and can be used for other projects, you can simply separate it for distribution. So your code is now reusable. + +## More Of My Topics + +#### + +#### + +#### + +#### + +#### + +#### + +#### + +#### From 88c33d6bc49affa4994a3cffd4a1fa59ca823443 Mon Sep 17 00:00:00 2001 From: jdevstatic Date: Tue, 9 Apr 2024 00:35:49 +0800 Subject: [PATCH 10/27] Create FUNDING.yml --- .github/FUNDING.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/FUNDING.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..9e50aa4 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1 @@ +github: jdevstatic From 5c4e54508bb96316dc85532d6fd6b75974038743 Mon Sep 17 00:00:00 2001 From: jdevfullstack Date: Sun, 28 Jul 2024 19:35:05 +0800 Subject: [PATCH 11/27] Update README.md --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index de2f407..4fa558e 100644 --- a/README.md +++ b/README.md @@ -31,19 +31,20 @@ can be programmed the way we want it to behave, then we can simply instruct it to do things for us. That's very practical, isn't it? -After the programmable computers, the next +After programmable computers, the next big question was how humans would program these computers. They began developing programming languages and the 1970s was a very remarkable period: the C language was invented. -After the success, the great potential was unleashed +After this success, the great potential was unleashed and we are now seeing the things a programmable computer can do: the era of information, real-time data, almost realistic 3D games, artificial intelligence, etc. -Learning computer science now is a very sophisticated -one unlike it was in the past: there are too many +Learning computer science today involves +many specialized fields, unlike in the past: +there are too many fields even in software development alone. And if you are a beginner, you might be discouraged From a4d7ba347971c682b63f64a87b7a9df34c3784e8 Mon Sep 17 00:00:00 2001 From: jdevfullstack Date: Sun, 28 Jul 2024 19:47:04 +0800 Subject: [PATCH 12/27] Update README.md --- README.md | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 4fa558e..b42438a 100644 --- a/README.md +++ b/README.md @@ -67,10 +67,10 @@ common in different programming languages.* ## Input And Output As was mentioned, a programmable computer is very -important but the way you interact with the computer -is through input and output: you as the user -will have an input, the computer will process it -(the way it is processed is programmed also), +important, but the way you interact with the computer +is through input and output: you, as the user, +will provide input, the computer will process it +(the way it is processed is also programmed), then the computer will output something. The very first demonstration is the "Hello World" program. The programmer will tell the computer @@ -81,17 +81,16 @@ as that. Typical programs like binary to human language (and vice versa) takes a lot of processing, an operating system to recognize computer applications, -a business collaborative tool with a lot of features +a business collaborative tool with many features to manage data, a 3D game that is almost realistic, an Artificial Intelligence program that can simulate humans in the virtual world! But of all the things programmers can do, the computer only processes input as binary data -(0s and 1s) and -it should not be interpreted literally. It's just -a representation of something a computer -can recognize: absence or presence of electric pulse. +(0s and 1s), and it should not be interpreted literally. +It's just a representation of something a computer +can recognize: the absence or presence of an electric pulse. Compare this with any drawing that can be accomplished just by simply using a dot-and-no-dot pattern! From 713462245a5c253ac85eecba73009849c36f5995 Mon Sep 17 00:00:00 2001 From: jdevfullstack Date: Sun, 28 Jul 2024 19:57:49 +0800 Subject: [PATCH 13/27] Update README.md --- README.md | 72 +++++++++++++++++++++++-------------------------------- 1 file changed, 30 insertions(+), 42 deletions(-) diff --git a/README.md b/README.md index b42438a..64022e9 100644 --- a/README.md +++ b/README.md @@ -111,50 +111,38 @@ int main() { } ``` -In this small program, the `#include` -tells the computer to include a certain -source which is needed because -it contains the predefined command `printf`. -`printf` simply tells the computer -to display the text provided by the programmer. - -As simple as that, you have now the complete -idea of what a programmable computer is all about. -It's you telling the computer to do things it -can handle in terms of binary data. +In this small program, the `#include` tells the computer to include a +certain source which is needed because it contains the predefined +command `printf`. `printf` simply tells the computer to display the +text provided by the programmer. + +As simple as that, you now have the complete idea of what a +programmable computer is all about. It's you telling the computer to +do things it can handle in terms of binary data. ## Variables And Data Types -In computer programming, a **variable** is just like -a container to store digital data. A **data type** -is the way you tell the computer how that data -will be interpreted. Should the computer interpret -that as letters? or numbers? or words? or simply -raw binary data? The computer does not know -that, you must tell it exactly. - -In computer programming, both these things -will enable you to store data and tell -the computer what kind of data it is. When you -store, you want to retrieve it later as per -needed. Remember also, computer's memory -is different from storage. Think of it -as the short-term memory and the storage -(the hard disk) as the long-term memory. -But during the runtime of a program you -are developing, you refer to memory as -`storage`. The computer's memory has the full -access to the CPU while the disk does not have -that access. -In order to read contents from the hard disk, -a request should be made. Hence, in programming -you are using the memory first not the disk. -There is the current development to combine -the two but is still on-going. - -Take note, the details of memory, hard disk -and CPU are quite complex but the mentioned -details above will serve as the starting point -for full comprehension. + +In computer programming, a **variable** is just like a container to +store digital data. A **data type** is the way you tell the computer +how that data will be interpreted. Should the computer interpret that +as letters? or numbers? or words? or simply raw binary data? The +computer does not know that, you must tell it exactly. + +In computer programming, both these things will enable you to store +data and tell the computer what kind of data it is. When you store, +you want to retrieve it later as needed. Remember also, computer's +memory is different from storage. Think of it as the short-term memory +and the storage (the hard disk) as the long-term memory. But during +the runtime of a program you are developing, you refer to memory as +`storage`. The computer's memory has full access to the CPU while the +disk does not have that access. In order to read contents from the +hard disk, a request should be made. Hence, in programming, you are +using the memory first, not the disk. There is current development to +combine the two, but it is still ongoing. + +Take note, the details of memory, hard disk, and CPU are quite complex, +but the mentioned details above will serve as the starting point for +full comprehension. ### Sample Program for Variables and Data Types ``` From ba10a215405a351e8588243ef634b195618d3473 Mon Sep 17 00:00:00 2001 From: jdevfullstack Date: Sun, 28 Jul 2024 20:01:30 +0800 Subject: [PATCH 14/27] Update README.md --- README.md | 79 +++++++++++++++++++++++++------------------------------ 1 file changed, 36 insertions(+), 43 deletions(-) diff --git a/README.md b/README.md index 64022e9..262e21f 100644 --- a/README.md +++ b/README.md @@ -21,49 +21,42 @@ TOC 1. [Sample Program Creating And Using Functions](#sample-program-creating-and-using-functions) ## Intro -Of all the inventions in the field of electronics -like the radio and telephone, the programmable computer -was the most significant one. It changed the -world forever. - -If ever a certain device -can be programmed the way we want it to behave, then -we can simply instruct it to do things for us. -That's very practical, isn't it? - -After programmable computers, the next -big question was how humans would program these computers. -They began developing programming languages and -the 1970s was a very remarkable period: -the C language was invented. - -After this success, the great potential was unleashed -and we are now seeing the things a programmable computer -can do: the era of information, real-time data, -almost realistic 3D games, artificial intelligence, etc. - -Learning computer science today involves -many specialized fields, unlike in the past: -there are too many -fields even in software development alone. - -And if you are a beginner, you might be discouraged -from all the things you need to learn but don't worry: -**you don't need to learn them all**. What you need -to learn first is the understanding how computers work -and the fundamentals of computer programming that -all computer programming languages have in common. - -And since almost every programming language nowadays -directly and indirectly inherits concepts from -the C language, we'll be using it to demonstrate -the core concepts of programming. - -*Take note: we don't want to discuss every -detail of the code in terms of the C language, -rather we just want to get the core -concepts of computer programming that are -common in different programming languages.* +Of all the inventions in the field of electronics like the radio and +telephone, the programmable computer was the most significant one. It +changed the world forever. + +If ever a certain device can be programmed the way we want it to +behave, then we can simply instruct it to do things for us. That's very +practical, isn't it? + +After programmable computers, the next big question was how humans +would program these computers. They began developing programming +languages and the 1970s was a very remarkable period: the C language +was invented. + +After this success, the great potential was unleashed and we are now +seeing the things a programmable computer can do: the era of +information, real-time data, almost realistic 3D games, artificial +intelligence, etc. + +Learning computer science today involves many specialized fields, +unlike in the past: there are too many fields even in software +development alone. + +And if you are a beginner, you might be discouraged from all the things +you need to learn but don't worry: **you don't need to learn them all**. +What you need to learn first is understanding how computers work and +the fundamentals of computer programming that all computer programming +languages have in common. + +And since almost every programming language nowadays directly and +indirectly inherits concepts from the C language, we'll be using it to +demonstrate the core concepts of programming. + +*Take note: we don't want to discuss every detail of the code in terms +of the C language, rather we just want to get the core concepts of +computer programming that are common in different programming +languages.* ## Input And Output As was mentioned, a programmable computer is very From fb8b592a3d2af5940c041d4929e5945a769e7919 Mon Sep 17 00:00:00 2001 From: jdevfullstack Date: Sun, 28 Jul 2024 20:05:05 +0800 Subject: [PATCH 15/27] Update README.md --- README.md | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 262e21f..0c6cea7 100644 --- a/README.md +++ b/README.md @@ -25,23 +25,22 @@ Of all the inventions in the field of electronics like the radio and telephone, the programmable computer was the most significant one. It changed the world forever. -If ever a certain device can be programmed the way we want it to -behave, then we can simply instruct it to do things for us. That's very +If a certain device can be programmed the way we want it to behave, +then we can simply instruct it to do things for us. That's very practical, isn't it? After programmable computers, the next big question was how humans -would program these computers. They began developing programming -languages and the 1970s was a very remarkable period: the C language -was invented. +would program them. They began developing programming languages and +the 1970s was a very remarkable period: the C language was invented. -After this success, the great potential was unleashed and we are now -seeing the things a programmable computer can do: the era of -information, real-time data, almost realistic 3D games, artificial -intelligence, etc. +After this success, great potential was unleashed, and we are now +seeing what a programmable computer can do: the era of information, +real-time data, almost realistic 3D games, artificial intelligence, +etc. Learning computer science today involves many specialized fields, -unlike in the past: there are too many fields even in software -development alone. +unlike in the past: there are many fields even in software development +alone. And if you are a beginner, you might be discouraged from all the things you need to learn but don't worry: **you don't need to learn them all**. From 5860b7fa9d54a73576dd72da9aadedd84277a021 Mon Sep 17 00:00:00 2001 From: jdevfullstack Date: Sun, 28 Jul 2024 21:40:40 +0800 Subject: [PATCH 16/27] Update README.md --- README.md | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 0c6cea7..ad2b3b0 100644 --- a/README.md +++ b/README.md @@ -467,20 +467,8 @@ If a function is generic and can be used for other projects, you can simply separate it for distribution. So your code is now reusable. -## More Of My Topics - -#### - -#### - -#### - -#### - -#### - -#### - -#### - -#### +## More Of My Content +- [jdevfullstack Profile](https://github.com/jdevfullstack) +- [jdevfullstack Repos](https://github.com/jdevfullstack?tab=repositories) +- [jdevfullstack Projects](https://github.com/jdevfullstack-projects) +- [jdevfullstack Tutorials](https://github.com/jdevfullstack-tutorials) From 75cd1b6698e12f1f0baf518126f5b5f8a7ea4e51 Mon Sep 17 00:00:00 2001 From: jdevfullstack Date: Sun, 28 Jul 2024 21:48:28 +0800 Subject: [PATCH 17/27] Update README.md --- README.md | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index ad2b3b0..4007df1 100644 --- a/README.md +++ b/README.md @@ -137,7 +137,7 @@ but the mentioned details above will serve as the starting point for full comprehension. ### Sample Program for Variables and Data Types -``` +```c #include int main() { @@ -154,16 +154,13 @@ int main() { } ``` -In this simple program, we declare and assign 3 -variables with different data types: -1. variable `i` that contains 1 numeric value -2. variable character `myletter[]` -that contains letters `myletter` -3. variable `x` that contains 1.23 value - -After that, the program is telling the computer -to display these values. +In this simple program, we declare and assign +three variables with different data types: +1. an integer variable `i` that contains the numeric value `1` +2. a character array `myletter[]` that contains the string `"myletter"` +3. a float variable `x` that contains the value `1.23` +After that, the program instructs the computer to display these values. ## Operators In programming just like in mathematics, there are From 1008151ca62dca03e8804771dd227d5ae99df20b Mon Sep 17 00:00:00 2001 From: jdevfullstack Date: Sun, 28 Jul 2024 21:55:00 +0800 Subject: [PATCH 18/27] Update README.md --- README.md | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 4007df1..bd2efa5 100644 --- a/README.md +++ b/README.md @@ -163,12 +163,12 @@ three variables with different data types: After that, the program instructs the computer to display these values. ## Operators -In programming just like in mathematics, there are -operators and the most common in computer programming -are assignment, arithmetic and comparison operators. +In programming, just like in mathematics, there are operators. The most +common in computer programming are assignment, arithmetic, and +comparison operators. ### Assignment Operators Sample Program -``` +```c #include int main() { @@ -185,12 +185,11 @@ int main() { } ``` -The most common assignment operator is -`=` and it should not be confused with -the double `==` comparison operator. +The most common assignment operator is `=`. It should not be confused +with the double `==` comparison operator. -This time, it is simply assigning a -value to a variable. The result is: +In this example, the `=` operator is simply assigning a value to a +variable. The result is: ``` c = 10 @@ -198,8 +197,8 @@ c = 15 c = 3 ``` -Variable `c` contains a value at a specific time. -It was changed in the program three times. +Variable `c` contains a value at a specific time. It was changed in the +program three times. ### Arithmetic Operators Sample Program ``` From 5899e847abfa8f68edde4f5a527d0e7a62701aa5 Mon Sep 17 00:00:00 2001 From: jdevfullstack Date: Sun, 28 Jul 2024 21:59:43 +0800 Subject: [PATCH 19/27] Update README.md --- README.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index bd2efa5..08e09e3 100644 --- a/README.md +++ b/README.md @@ -201,7 +201,7 @@ Variable `c` contains a value at a specific time. It was changed in the program three times. ### Arithmetic Operators Sample Program -``` +```c #include int main() { @@ -209,31 +209,31 @@ int main() { int b = 5; int result; - printf("where a = %d & b = %d \n", a, b); + printf("where a = %d & b = %d\n", a, b); result = a + b; - printf("a+b = %d \n", result); + printf("a + b = %d\n", result); result = a - b; - printf("a-b = %d \n", result); + printf("a - b = %d\n", result); result = a * b; - printf("a*b = %d \n", result); + printf("a * b = %d\n", result); result = a / b; - printf("a/b = %d \n", result); + printf("a / b = %d\n", result); return 0; } ``` -Since these are arithmetic operators, they -will do the basic arithmetic operations. + +Since these are arithmetic operators, they will perform basic arithmetic operations. The result is: ``` -where a = 10 & b = 5 -a+b = 15 -a-b = 5 -a*b = 50 -a/b = 2 +where a = 10 & b = 5 +a + b = 15 +a - b = 5 +a * b = 50 +a / b = 2 ``` ### Comparison Operators Sample Program From ee5f99ce19d19a431c8d1821eb930217a6699b08 Mon Sep 17 00:00:00 2001 From: jdevfullstack Date: Sun, 28 Jul 2024 22:02:39 +0800 Subject: [PATCH 20/27] Update README.md --- README.md | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 08e09e3..3080e85 100644 --- a/README.md +++ b/README.md @@ -237,32 +237,30 @@ a / b = 2 ``` ### Comparison Operators Sample Program -``` +```c #include int main() { int a = 10, b = 10, c = 20; - printf("%d == %d is %d \n", a, b, a == b); - printf("%d == %d is %d \n", a, c, a == c); - printf("%d > %d is %d \n", a, b, a > b); + printf("%d == %d is %d\n", a, b, a == b); + printf("%d == %d is %d\n", a, c, a == c); + printf("%d > %d is %d\n", a, b, a > b); return 0; } ``` -Since these are comparison operators, they are -comparing the left and right side values. +Since these are comparison operators, they compare the left and right side values. The result is: ``` -10 == 10 is 1 -10 == 20 is 0 -10 > 10 is 0 +10 == 10 is 1 +10 == 20 is 0 +10 > 10 is 0 ``` -The result is either 0 or 1 and remember, -0 is FALSE and 1 is TRUE. +The result is either 0 or 1. Remember, 0 is FALSE and 1 is TRUE. ## Conditionals In a comprehensive program, the computer must decide From 5de8b7eca8ab759067bc0e2d136f30972bb1fbde Mon Sep 17 00:00:00 2001 From: jdevfullstack Date: Sun, 28 Jul 2024 22:11:06 +0800 Subject: [PATCH 21/27] Update README.md --- README.md | 49 +++++++++++++++++++++++-------------------------- 1 file changed, 23 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index 3080e85..7629e84 100644 --- a/README.md +++ b/README.md @@ -263,60 +263,57 @@ The result is: The result is either 0 or 1. Remember, 0 is FALSE and 1 is TRUE. ## Conditionals -In a comprehensive program, the computer must decide -based on the condition/s given. Of course, the computer -cannot do that alone, you must instruct it exactly. -The most common is the -IF statement with the extended IF/ELSE. +In a comprehensive program, the computer must make decisions based on given +conditions. Of course, the computer cannot do this alone; you must instruct it +exactly. The most common conditional statement is the `IF` statement, often +extended with `IF/ELSE`. ### Sample Program Using IF -``` +```c #include int main() { int i = 10; - if (i == 10) printf("Expected value is the same as variable i, so the result is TRUE. \n"); + if (i == 10) { + printf("Expected value is the same as variable i, so the result is TRUE.\n"); + } return 0; } ``` -In a single IF statement, the programmer wants to test, -expect or verify something, such as this program. -The programmer is expecting that `i` variable -has the value 10, and variable `i` has the same -value, so the statement -`Expected value is the same as variable i, so the result is TRUE.` -will be printed. If the expected value is -not the same as the value of the variable, +In a single `IF` statement, the programmer wants to test, expect, or verify +something. In this program, the programmer expects that the variable `i` has +the value 10. Since variable `i` does have the value 10, the statement +`Expected value is the same as variable i, so the result is TRUE.` will be +printed. If the expected value is not the same as the value of the variable, the statement will not be printed. -Sometimes, just an IF will not be sufficient, -particularly when you want to catch the FALSE result -or create a nested IF-ELSE. So, you want to extend it -and catch the FALSE result. +Sometimes, just an `IF` statement is not sufficient, particularly when you want +to handle the FALSE result or create a nested `IF-ELSE`. In such cases, you +extend it to catch the FALSE result. ### Sample Program Using IF ELSE -``` +```c #include int main() { int i = 10; if (i == 11) { - printf("Expected value is the same as variable i, so the result is TRUE. \n"); + printf("Expected value is the same as variable i, so the result is TRUE.\n"); } else { - printf("Expected value is not the same as variable i, so the result is FALSE. \n"); + printf("Expected value is not the same as variable i, so the result is FALSE.\n"); } + return 0; } ``` -Not only the statement in the ELSE branch will be printed, -you can do a lot of things just like correct an error, -go to a certain part of a program, etc. That's the power -of catching the FALSE result. +Not only can the statement in the `ELSE` branch be printed, but you can also +perform various actions such as correcting an error, navigating to a certain +part of a program, etc. That's the power of catching the FALSE result. ## Loops There are commands or portions of your program From 725e756dd74702a249b149dbd67f2558bc03dbea Mon Sep 17 00:00:00 2001 From: jdevfullstack Date: Sun, 28 Jul 2024 22:21:15 +0800 Subject: [PATCH 22/27] Update README.md --- README.md | 130 +++++++++++++++++++++++++----------------------------- 1 file changed, 59 insertions(+), 71 deletions(-) diff --git a/README.md b/README.md index 7629e84..0d91dfe 100644 --- a/README.md +++ b/README.md @@ -316,104 +316,92 @@ perform various actions such as correcting an error, navigating to a certain part of a program, etc. That's the power of catching the FALSE result. ## Loops -There are commands or portions of your program -to be repeated several times. Loops are there to do -that. Now, there are simple loops and -loops based on a given condition, -much like a repeated IF statement. -Simple loops are like repeat 10 times or repeat -forever. Conditional loops are loops with -specific conditions other than simple iteration -just like in robot programming: -repeat until color red, repeat until the -distance is less than 50mm, etc. - -The most common that we see in computer -programming: the `for` loop, -`while` loop and `do-while` loop. +There are commands or portions of your program to be repeated several times. +Loops are there to do that. Now, there are simple loops and loops based on a +given condition, much like a repeated IF statement. Simple loops are like +"repeat 10 times" or "repeat forever." Conditional loops are loops with +specific conditions other than simple iteration, just like in robot +programming: "repeat until color red," "repeat until the distance is less than +50mm," etc. + +The most common loops that we see in computer programming are the `for` loop, +`while` loop, and `do-while` loop. ### Sample Program Using Loops -``` +```c #include int main() { - int n = 11; - int i; int x[n]; - printf("the `for` loop: \n"); - for (i = 1; i < n; i++) { - printf("iteration: %d | Hello World. \n", i); + printf("The `for` loop:\n"); + for (i = 1; i < n; i++) { + printf("Iteration: %d | Hello World.\n", i); } int y = 0; - printf("------ \n"); - printf("the `while` loop: \n"); + printf("------\n"); + printf("The `while` loop:\n"); while (y < 10) { y += 1; - printf("iteration: %d | Hello World. \n", y); + printf("Iteration: %d | Hello World.\n", y); } y = 0; - - printf("------ \n"); - printf("the `do while` loop: \n"); - + printf("------\n"); + printf("The `do-while` loop:\n"); do { y += 1; - printf("iteration: %d | Hello World. \n", y); - } - while (y < 10); + printf("Iteration: %d | Hello World.\n", y); + } while (y < 10); return 0; - } ``` -the result: +The result: ``` -the `for` loop: -iteration: 1 | Hello World. -iteration: 2 | Hello World. -iteration: 3 | Hello World. -iteration: 4 | Hello World. -iteration: 5 | Hello World. -iteration: 6 | Hello World. -iteration: 7 | Hello World. -iteration: 8 | Hello World. -iteration: 9 | Hello World. -iteration: 10 | Hello World. ------- -the `while` loop: -iteration: 1 | Hello World. -iteration: 2 | Hello World. -iteration: 3 | Hello World. -iteration: 4 | Hello World. -iteration: 5 | Hello World. -iteration: 6 | Hello World. -iteration: 7 | Hello World. -iteration: 8 | Hello World. -iteration: 9 | Hello World. -iteration: 10 | Hello World. ------- -the `do while` loop: -iteration: 1 | Hello World. -iteration: 2 | Hello World. -iteration: 3 | Hello World. -iteration: 4 | Hello World. -iteration: 5 | Hello World. -iteration: 6 | Hello World. -iteration: 7 | Hello World. -iteration: 8 | Hello World. -iteration: 9 | Hello World. -iteration: 10 | Hello World. +The `for` loop: +Iteration: 1 | Hello World. +Iteration: 2 | Hello World. +Iteration: 3 | Hello World. +Iteration: 4 | Hello World. +Iteration: 5 | Hello World. +Iteration: 6 | Hello World. +Iteration: 7 | Hello World. +Iteration: 8 | Hello World. +Iteration: 9 | Hello World. +Iteration: 10 | Hello World. +------ +The `while` loop: +Iteration: 1 | Hello World. +Iteration: 2 | Hello World. +Iteration: 3 | Hello World. +Iteration: 4 | Hello World. +Iteration: 5 | Hello World. +Iteration: 6 | Hello World. +Iteration: 7 | Hello World. +Iteration: 8 | Hello World. +Iteration: 9 | Hello World. +Iteration: 10 | Hello World. +------ +The `do-while` loop: +Iteration: 1 | Hello World. +Iteration: 2 | Hello World. +Iteration: 3 | Hello World. +Iteration: 4 | Hello World. +Iteration: 5 | Hello World. +Iteration: 6 | Hello World. +Iteration: 7 | Hello World. +Iteration: 8 | Hello World. +Iteration: 9 | Hello World. +Iteration: 10 | Hello World. ``` -As you can see here, it's just printing the -Hello World ten times, whether it's `for` loop, -`while` loop or `do-while` loop. +As you can see here, it's just printing "Hello World" ten times, whether it's +a `for` loop, `while` loop, or `do-while` loop. ## Functions A function is a group of statements (commands) From d6047cc7c170d9b9a1e1ac7e4816532bc48c7bba Mon Sep 17 00:00:00 2001 From: jdevfullstack Date: Sun, 28 Jul 2024 22:30:48 +0800 Subject: [PATCH 23/27] Update README.md --- README.md | 37 +++++++++++++++---------------------- 1 file changed, 15 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 0d91dfe..c2b4124 100644 --- a/README.md +++ b/README.md @@ -404,13 +404,12 @@ As you can see here, it's just printing "Hello World" ten times, whether it's a `for` loop, `while` loop, or `do-while` loop. ## Functions -A function is a group of statements (commands) -that together perform a task. -There are built-in functions and functions that a -programmer will create according to his/her needs. +A function is a group of statements (commands) that together perform a task. +There are built-in functions and functions that a programmer will create +according to his/her needs. ### Sample Program Creating And Using Functions -``` +```c #include void myFunction() { @@ -420,31 +419,25 @@ void myFunction() { } int main() { - myFunction(); - return 0; } ``` -The function `printFunctionTest()` is created by -declaring `void` first. Other functions will return values -but for the sake of simplicity we create a void `function`. -A `void` function will simply execute the commands -contained in it, nothing else. +The function `myFunction()` is created by declaring `void` first. Other +functions will return values, but for simplicity, we create a void function. +A `void` function will simply execute the commands contained in it, nothing +else. -Then inside the main function, you simply invoke it -by its name. And all the commands inside that function -will be executed line by line. +Then inside the main function, you simply invoke it by its name. All the +commands inside that function will be executed line by line. -Why use functions? Imagine if there is none. Complex -programs are usually composed of thousands of lines of code -up to million, without any grouping, that will be -very hard to handle. +Why use functions? Imagine if there were none. Complex programs are usually +composed of thousands to millions of lines of code. Without any grouping, +that would be very hard to handle. -If a function is generic and can be used for other -projects, you can simply separate it for distribution. -So your code is now reusable. +If a function is generic and can be used for other projects, you can simply +separate it for distribution. So your code is now reusable. ## More Of My Content - [jdevfullstack Profile](https://github.com/jdevfullstack) From 14324f47764f2525ea914e42d7f34f9738df2a6f Mon Sep 17 00:00:00 2001 From: jdevfullstack Date: Sun, 28 Jul 2024 22:34:01 +0800 Subject: [PATCH 24/27] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c2b4124..89a0420 100644 --- a/README.md +++ b/README.md @@ -90,7 +90,7 @@ It's the same thing for the computer. ### Hello World Program -``` +```c #include int main() { From 8f057feb37174c8631adcf9d8a5fa4349f974b68 Mon Sep 17 00:00:00 2001 From: jdevfullstack Date: Sun, 28 Jul 2024 22:44:50 +0800 Subject: [PATCH 25/27] Update README.md --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 89a0420..20dcf0e 100644 --- a/README.md +++ b/README.md @@ -17,8 +17,11 @@ TOC 5. [Conditionals](#conditionals) 1. [Sample Program Using IF](#sample-program-using-if) 2. [Sample Program Using IF/ELSE](#sample-program-using-if-else) -6. [Functions](#functions) +6. [Loops](#loops) + 1. [Sample Program Using Loops](#sample-program-using-loops) +7. [Functions](#functions) 1. [Sample Program Creating And Using Functions](#sample-program-creating-and-using-functions) +8. [More Of My Content](#more-of-my-content) ## Intro Of all the inventions in the field of electronics like the radio and From 7e8dd0761cc8164237cbd95c09d89167ba46ffb2 Mon Sep 17 00:00:00 2001 From: jdevfullstack Date: Tue, 30 Jul 2024 21:29:22 +0800 Subject: [PATCH 26/27] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 20dcf0e..cb83343 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Core Concepts of Computer Programming -*`updated 28 May 2023`* +*`updated July 30, 2024`* [![Hits](https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com%2Fjdevstatic%2Fprogramming-core-concepts&count_bg=%2379C83D&title_bg=%23555555&icon=&icon_color=%23E7E7E7&title=PAGE+VIEWS&edge_flat=false)](https://hits.seeyoufarm.com) From 4f02612e238590fac3018c0bae6551dd32d0ce3b Mon Sep 17 00:00:00 2001 From: jdevfullstack Date: Thu, 1 Aug 2024 00:05:32 +0800 Subject: [PATCH 27/27] Update README.md --- README.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index cb83343..3f981dd 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Core Concepts of Computer Programming -*`updated July 30, 2024`* +*`updated July 31, 2024`* [![Hits](https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com%2Fjdevstatic%2Fprogramming-core-concepts&count_bg=%2379C83D&title_bg=%23555555&icon=&icon_color=%23E7E7E7&title=PAGE+VIEWS&edge_flat=false)](https://hits.seeyoufarm.com) @@ -41,9 +41,8 @@ seeing what a programmable computer can do: the era of information, real-time data, almost realistic 3D games, artificial intelligence, etc. -Learning computer science today involves many specialized fields, -unlike in the past: there are many fields even in software development -alone. +Learning computer science today, unlike in the past, involves many +specialized fields, even in software development alone. And if you are a beginner, you might be discouraged from all the things you need to learn but don't worry: **you don't need to learn them all**.