From 6e452dcb42e129b9d82c3b3fbbcdd5266babb6f9 Mon Sep 17 00:00:00 2001
From: Habiba Sorour
Date: Tue, 28 Jul 2026 20:41:04 +0300
Subject: [PATCH 1/3] add listing
---
source/ch4_conditionals.ptx | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/source/ch4_conditionals.ptx b/source/ch4_conditionals.ptx
index 0b32d00..aedec88 100644
--- a/source/ch4_conditionals.ptx
+++ b/source/ch4_conditionals.ptx
@@ -16,17 +16,21 @@
In Python the simple if statement is written as:
-
+
+
score = 95
if score >= 90:
print("Excellent work!")
+
+
In Java, this same pattern requires two changes: the condition must be in parentheses (), and the code block must be enclosed in curly braces {}.
-
+
+
public class SimpleIfExample {
public static void main(String[] args) {
@@ -38,6 +42,8 @@ if score >= 90:
}
+
+
Once again you can see that in Java the curly braces define a block rather than indentation.
In Java, the parentheses around the condition are required because it is technically a function that evaluates to True or False.
From 3134fb387f92389e91d8e58234964f95b1dc2104 Mon Sep 17 00:00:00 2001
From: Habiba Sorour
Date: Tue, 28 Jul 2026 20:46:41 +0300
Subject: [PATCH 2/3] add the listing on text
---
source/ch4_conditionals.ptx | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/source/ch4_conditionals.ptx b/source/ch4_conditionals.ptx
index aedec88..bbb175c 100644
--- a/source/ch4_conditionals.ptx
+++ b/source/ch4_conditionals.ptx
@@ -13,7 +13,7 @@
- In Python the simple if statement is written as:
+ shows how the simple if statement is written in Python.
@@ -25,9 +25,9 @@ if score >= 90:
-
+
- In Java, this same pattern requires two changes: the condition must be in parentheses (), and the code block must be enclosed in curly braces {}.
+ shows how the simple if statement is written in Java.
From 2b3c9ef0f04b34b9f32e3890f07c91d1607716b3 Mon Sep 17 00:00:00 2001
From: Habiba Sorour
Date: Tue, 28 Jul 2026 23:35:29 +0300
Subject: [PATCH 3/3] fixed a deleted paragraph
---
source/ch4_conditionals.ptx | 2 ++
1 file changed, 2 insertions(+)
diff --git a/source/ch4_conditionals.ptx b/source/ch4_conditionals.ptx
index bbb175c..91dd65a 100644
--- a/source/ch4_conditionals.ptx
+++ b/source/ch4_conditionals.ptx
@@ -26,7 +26,9 @@ if score >= 90:
+
+ In Java, this same pattern requires two changes: the condition must be in parentheses (), and the code block must be enclosed in curly braces {}.
shows how the simple if statement is written in Java.