You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: en/_sources/conditionals.txt
+15-5Lines changed: 15 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,13 @@ Conditional statements
4
4
Introduction
5
5
============
6
6
7
-
So far we have accomplished predefined tasks, but in all honesty we were accomplishing no better achievements than the 18th century automata, or the music boxes following one set of instruction to the end. What makes programming so much more powerful are conditional statements. This is the ability to *test* a variable against a value and act in one way if the condition is met by the variable or an other way if not. They are also commonly called by programmers *if statements*.
7
+
So far we have accomplished predefined tasks, but in all honesty we
8
+
were accomplishing no better than old-time music boxes following one
9
+
set of instructions to the end. What makes programming so much more
10
+
powerful are conditional statements. This is the ability to *test* a
11
+
variable against a value and act in one way if the condition is met by
12
+
the variable or another way if not. They are also commonly called by
13
+
programmers *if statements*.
8
14
9
15
To know if a condition is *True* of *False*, we need a new type of data:
10
16
the booleans. They allow logical operations.
@@ -20,8 +26,8 @@ The condition can be anything that evaluates as *True* or
20
26
*False*. Comparisons always return *True* or *False*, for example
0 commit comments