Skip to content

Commit 6f3b153

Browse files
authored
Merge pull request RunestoneInteractive#71 from FlashEb/Issue-#28-Fix
Partial Fix for Issue RunestoneInteractive#28
2 parents b3c425a + 9360bda commit 6f3b153

1 file changed

Lines changed: 91 additions & 0 deletions

File tree

‎source/ch_2_whylearnjava.ptx‎

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,4 +97,95 @@
9797

9898

9999
</section>
100+
<section xml:id="learn_languages_summary">
101+
<title>Summary &amp; Reading Questions</title>
102+
<p><ol label="1">
103+
<li>
104+
<p>Learning multiple programming languages helps programmers adapt to different styles and environments.</p>
105+
</li>
106+
<li>
107+
<p>Python is a dynamic scripting language that is beginner-friendly, but it is less strict with types and generally slower than compiled languages.</p>
108+
</li>
109+
<li>
110+
<p>Languages like Java and C++ are statically typed and offer better performance and maintainability for large-scale projects.</p>
111+
</li>
112+
<li>
113+
<p>Java has a simpler syntax than C++ and includes automatic garbage collection, which reduces the complexity of memory management.</p>
114+
</li>
115+
<li>
116+
<p>Java’s extensive standard library enables the development of sophisticated programs without relying on external dependencies.</p>
117+
</li>
118+
</ol></p>
119+
<reading-questions xml:id="rqs-learnlang2">
120+
<exercise label="summary-lang-1">
121+
<statement>
122+
<p>Which of the following best describes Python as a programming language?</p>
123+
</statement>
124+
<choices>
125+
<choice>
126+
<statement><p>Statically typed and high-performance</p></statement>
127+
<feedback><p>No. This better describes languages like Java or C++.</p></feedback>
128+
</choice>
129+
<choice correct="yes">
130+
<statement><p>Dynamically typed and beginner-friendly</p></statement>
131+
<feedback><p>That’s right! Python is dynamically typed and easy for beginners.</p></feedback>
132+
</choice>
133+
<choice>
134+
<statement><p>Industrial strength and verbose</p></statement>
135+
<feedback><p>No. Python is more informal and concise.</p></feedback>
136+
</choice>
137+
<choice>
138+
<statement><p>Memory-managed and pointer-based</p></statement>
139+
<feedback><p>No. That describes lower-level languages like C or C++.</p></feedback>
140+
</choice>
141+
</choices>
142+
</exercise>
143+
<exercise label="summary-lang-2">
144+
<statement>
145+
<p>Why is Java a better language for beginners compared to C++?</p>
146+
</statement>
147+
<choices>
148+
<choice>
149+
<statement><p>It requires more manual memory management</p></statement>
150+
<feedback><p>No. Java manages memory automatically.</p></feedback>
151+
</choice>
152+
<choice>
153+
<statement><p>It has a smaller standard library</p></statement>
154+
<feedback><p>No. Java has a very large standard library.</p></feedback>
155+
</choice>
156+
<choice correct="yes">
157+
<statement><p>It avoids complex syntax and has automatic garbage collection</p></statement>
158+
<feedback><p>Correct! These features make Java easier for beginners.</p></feedback>
159+
</choice>
160+
<choice>
161+
<statement><p>It supports operator overloading</p></statement>
162+
<feedback><p>No. That's a C++ feature and it adds complexity.</p></feedback>
163+
</choice>
164+
</choices>
165+
</exercise>
166+
<exercise label="summary-lang-3">
167+
<statement>
168+
<p>What is a major benefit of learning multiple programming languages?</p>
169+
</statement>
170+
<choices>
171+
<choice>
172+
<statement><p>You can standardize all projects using one universal syntax</p></statement>
173+
<feedback><p>No. Each language has its own syntax and is suited for different tasks.</p></feedback>
174+
</choice>
175+
<choice>
176+
<statement><p>You will minimize runtime errors across all platforms</p></statement>
177+
<feedback><p>No. Runtime errors depend more on logic and environment than the number of languages you know.</p></feedback>
178+
</choice>
179+
<choice correct="yes">
180+
<statement><p>You gain exposure to different language features and paradigms</p></statement>
181+
<feedback><p>Great choice! This helps you become a more adaptable and well-rounded programmer.</p></feedback>
182+
</choice>
183+
<choice>
184+
<statement><p>You can bypass the need for understanding compilation and interpretation</p></statement>
185+
<feedback><p>No. Understanding how code is executed remains essential regardless of how many languages you know.</p></feedback>
186+
</choice>
187+
</choices>
188+
</exercise>
189+
</reading-questions>
190+
</section>
100191
</chapter>

0 commit comments

Comments
 (0)