Skip to content

Commit 51ce11c

Browse files
committed
Removing numbers and fix code indentation
1 parent 3954afa commit 51ce11c

3 files changed

Lines changed: 63 additions & 23 deletions

File tree

pretext/functions/funcWithStrsAndConds.ptx

Lines changed: 58 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -107,26 +107,26 @@
107107
<program xml:id="fsc_ac_pogil_print_message_v2_ac_editor" interactive="activecode" language="python">
108108
<input>
109109
# function definition
110-
def test(a, b = 2):
111-
print("Welcome")
112-
print("Learn the power of functions!")
113-
print(a + b)
114-
print(a - b)
115-
print(a * b)
116-
print(a / b)
117-
print(a // b)
118-
a = 5 % 2
119-
return a
110+
def test(a, b = 2):
111+
print("Welcome")
112+
print("Learn the power of functions!")
113+
print(a + b)
114+
print(a - b)
115+
print(a * b)
116+
print(a / b)
117+
print(a // b)
118+
a = 5 % 2
119+
return a
120120

121-
# function definition
122-
def main():
123-
print("Hello!")
124-
125-
# function call
126-
print(test(3))
121+
# function definition
122+
def main():
123+
print("Hello!")
127124

128125
# function call
129-
main()
126+
print(test(3))
127+
128+
# function call
129+
main()
130130
</input>
131131
</program>
132132
</exercise>
@@ -174,7 +174,47 @@
174174
</var>
175175
</setup>
176176
</exercise>
177-
177+
178+
<exercise label="fsc_pp_print_name_v2" numbered="yes" adaptive="yes" indentation="hide" language="python">
179+
<statement>
180+
<p>Drag the blocks from the left and put them in the correct order on the right to define a function <c>print_greeting</c> that asks for your name and prints <q>Hello Name</q>. Then define a <c>main</c> function that calls <c>print_greeting</c>. Be sure to also call the <c>main</c> function. Note that you will have to indent the lines that are in the body of each function. Click the <em>Check</em> button to check your solution.</p>
181+
</statement>
182+
<blocks>
183+
<block order="5">
184+
<choice correct="yes">
185+
<cline>def print_greeting():</cline>
186+
</choice>
187+
<choice>
188+
<cline>def print_greeting() </cline>
189+
</choice>
190+
</block>
191+
<block order="8">
192+
<cline> name = input("What is your name?")</cline>
193+
</block>
194+
<block order="9">
195+
<cline> print("Hello " + name)</cline>
196+
</block>
197+
<block order="7">
198+
<choice correct="yes">
199+
<cline>def main():</cline>
200+
</choice>
201+
<choice>
202+
<cline>Def main(): </cline>
203+
</choice>
204+
</block>
205+
<block order="4">
206+
<choice correct="yes">
207+
<cline> print_greeting()</cline>
208+
</choice>
209+
<choice>
210+
<cline> print_greeting </cline>
211+
</choice>
212+
</block>
213+
<block order="3">
214+
<cline>main()</cline>
215+
</block>
216+
</blocks>
217+
</exercise>
178218
</subsection>
179219
</section>
180220
</worksheet>

pretext/intro/why-program.ptx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
the question, <q>What would you like me to do next?</q></p>
1616
<exercise label="intro-whyprogram-mc-ask">
1717
<statement>
18-
<p>Q-1: Hardware in today's computers is built to continuously ask what?</p>
18+
<p>Hardware in today's computers is built to continuously ask what?</p>
1919
</statement>
2020
<choices>
2121
<choice>
@@ -60,7 +60,7 @@
6060
helpful and capable of helping us do many different things.</p>
6161
<exercise label="intro-whyprogram-mc-add">
6262
<statement>
63-
<p>Q-2: What does a programmer add to a computer's hardware?</p>
63+
<p>What does a programmer add to a computer's hardware?</p>
6464
</statement>
6565
<choices>
6666
<choice correct="yes">
@@ -129,7 +129,7 @@ to 16
129129
to this partnership.</p>
130130
<exercise label="intro-whyprogram-mc-common">
131131
<statement>
132-
<p>Q-3: What is the most commonly used word in the first three paragraphs of this page and how many times is it used?</p>
132+
<p>What is the most commonly used word in the first three paragraphs of this page and how many times is it used?</p>
133133
</statement>
134134
<choices>
135135
<choice>

pretext/variables/values-and-types.ptx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ print(type(3.2))
4343
they are in quotation marks like strings.</p>
4444
<exercise label="var-value-mc-string">
4545
<statement>
46-
<p>csp-10-2-3: The values <q>17</q> and <q>3.2</q> are what type?</p>
46+
<p>The values <q>17</q> and <q>3.2</q> are what type?</p>
4747
</statement>
4848
<choices>
4949
<choice>
@@ -103,7 +103,7 @@ print(1,000,000)
103103
thing.</p>
104104
<exercise label="var-value-mc-int">
105105
<statement>
106-
<p>csp-10-2-6: How would you print the <em>integer</em> <c>1,000,000</c>?</p>
106+
<p>How would you print the <em>integer</em> <c>1,000,000</c>?</p>
107107
</statement>
108108
<choices>
109109
<choice>

0 commit comments

Comments
 (0)