Skip to content

Commit 2edc7fe

Browse files
AP-CSPrinciplesAP-CSPrinciples
authored andcommitted
Autobuild latest version
1 parent ec35436 commit 2edc7fe

File tree

4 files changed

+40
-25
lines changed

4 files changed

+40
-25
lines changed

docs/.doctrees/Unit 2/data.doctree

44 Bytes
Binary file not shown.

docs/.doctrees/environment.pickle

0 Bytes
Binary file not shown.

docs/Unit 2/data.html

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -719,24 +719,39 @@ <h2>Data Project 1 - Data Communication and Compression:<a class="headerlink" hr
719719
<hr class="docutils" />
720720
<p><strong>2. Binary to ASCII Decoder</strong></p>
721721
<p><strong>Objective:</strong> Write a function that takes a string of binary numbers (representing ASCII values) and converts it back into readable text.</p>
722-
<p><strong>1. Create a Function with One Parameter</strong></p>
722+
<ol class="arabic simple">
723+
<li><p>Create a Function with One Parameter</p>
723724
<ul class="simple">
724725
<li><p>The parameter should accept a <strong>binary string</strong> with groups of 8 digits separated by spaces.</p></li>
725-
<li><p>This will be the message you want to decode.
726-
<strong>2. Split the Message into Parts</strong></p></li>
726+
<li><p>This will be the message you want to decode.</p></li>
727+
</ul>
728+
</li>
729+
<li><p>Split the Message into Parts</p>
730+
<ul class="simple">
727731
<li><p>Use a method to <strong>split</strong> the long binary message into a <strong>list</strong> of smaller strings.</p></li>
728-
<li><p>Each piece should be exactly <strong>8 digits long</strong> — representing one character.
729-
<strong>3. Create an Empty String to Store the Result</strong></p></li>
730-
<li><p>You’ll build your decoded message <strong>one letter at a time</strong>, so start with an empty string.
731-
<strong>4. For Each Binary Group:</strong></p></li>
732+
<li><p>Each piece should be exactly <strong>8 digits long</strong> — representing one character.</p></li>
733+
</ul>
734+
</li>
735+
<li><p>Create an Empty String to Store the Result</p>
736+
<ul class="simple">
737+
<li><p>You’ll build your decoded message <strong>one letter at a time</strong>, so start with an empty string.</p></li>
738+
</ul>
739+
</li>
740+
<li><p>For Each Binary Group:</p>
741+
<ul class="simple">
732742
<li><p>Convert it from <strong>binary to decimal</strong> (this gives you the ASCII number).</p></li>
733743
<li><p>Convert that decimal number to a <strong>character</strong> (letter, number, or symbol).</p></li>
734-
<li><p>Add the character to your decoded message string.
735-
<strong>5. Return the Final Text</strong></p></li>
744+
<li><p>Add the character to your decoded message string.</p></li>
745+
</ul>
746+
</li>
747+
<li><p>Return the Final Text</p>
748+
<ul class="simple">
736749
<li><p>Once every group has been processed, return the final sentence made from all the characters.</p></li>
737750
<li><p>Call your function and pass the binary message:</p></li>
738751
<li><p>Display the result on screen using a <strong>label</strong> or print statement. It should reveal a <strong>readable sentence</strong>!</p></li>
739752
</ul>
753+
</li>
754+
</ol>
740755
<p><strong>Pseudocode</strong></p>
741756
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Define</span> <span class="n">a</span> <span class="n">function</span> <span class="n">that</span> <span class="n">receives</span> <span class="n">a</span> <span class="n">binary</span> <span class="n">message</span>
742757
<span class="n">Break</span> <span class="n">the</span> <span class="n">message</span> <span class="n">into</span> <span class="n">a</span> <span class="nb">list</span> <span class="n">of</span> <span class="n">binary</span> <span class="n">pieces</span>

docs/_sources/Unit 2/data.md.txt

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -188,22 +188,22 @@ binary_data.append(binary_string) # Step 3: Add to list
188188
**Objective:** Write a function that takes a string of binary numbers (representing ASCII values) and converts it back into readable text.
189189

190190

191-
**1. Create a Function with One Parameter**
192-
* The parameter should accept a **binary string** with groups of 8 digits separated by spaces.
193-
* This will be the message you want to decode.
194-
**2. Split the Message into Parts**
195-
* Use a method to **split** the long binary message into a **list** of smaller strings.
196-
* Each piece should be exactly **8 digits long** — representing one character.
197-
**3. Create an Empty String to Store the Result**
198-
* You’ll build your decoded message **one letter at a time**, so start with an empty string.
199-
**4. For Each Binary Group:**
200-
* Convert it from **binary to decimal** (this gives you the ASCII number).
201-
* Convert that decimal number to a **character** (letter, number, or symbol).
202-
* Add the character to your decoded message string.
203-
**5. Return the Final Text**
204-
* Once every group has been processed, return the final sentence made from all the characters.
205-
* Call your function and pass the binary message:
206-
* Display the result on screen using a **label** or print statement. It should reveal a **readable sentence**!
191+
1. Create a Function with One Parameter
192+
* The parameter should accept a **binary string** with groups of 8 digits separated by spaces.
193+
* This will be the message you want to decode.
194+
2. Split the Message into Parts
195+
* Use a method to **split** the long binary message into a **list** of smaller strings.
196+
* Each piece should be exactly **8 digits long** — representing one character.
197+
3. Create an Empty String to Store the Result
198+
* You’ll build your decoded message **one letter at a time**, so start with an empty string.
199+
4. For Each Binary Group:
200+
* Convert it from **binary to decimal** (this gives you the ASCII number).
201+
* Convert that decimal number to a **character** (letter, number, or symbol).
202+
* Add the character to your decoded message string.
203+
5. Return the Final Text
204+
* Once every group has been processed, return the final sentence made from all the characters.
205+
* Call your function and pass the binary message:
206+
* Display the result on screen using a **label** or print statement. It should reveal a **readable sentence**!
207207

208208

209209
**Pseudocode**

0 commit comments

Comments
 (0)