Skip to content
Snippets Groups Projects
Commit d6b8a069 authored by jo2-holdsworth's avatar jo2-holdsworth
Browse files

demo

parent 01baac06
No related branches found
No related tags found
No related merge requests found
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
- [Task 2: Python encode / decode.](#task-2-python-encode--decode) - [Task 2: Python encode / decode.](#task-2-python-encode--decode)
- [Task 3: Unit testing.](#task-3-unit-testing) - [Task 3: Unit testing.](#task-3-unit-testing)
- [Task 4: Expanding capability.](#task-4-expanding-capability) - [Task 4: Expanding capability.](#task-4-expanding-capability)
- [Demos](#demos)
- [Getting Started](#getting-started) - [Getting Started](#getting-started)
- [Dependencies](#dependencies) - [Dependencies](#dependencies)
- [Installing](#installing) - [Installing](#installing)
...@@ -68,7 +69,17 @@ ___ ...@@ -68,7 +69,17 @@ ___
* ***inserter.py*** is designed to take an heap string and add values to that heap. It also will add new layers by adding the correct amount of Null characters. This is what the tree looks like in heap form now.![image](src/screenshot22.PNG). The function to insert is very simple and the next worksheet builds on a similar method so it will be very useful. ![image](src/screenshot23.PNG) When we run our new characters to be inserted ![image](src/screenshot24.PNG) we get ![image](src/screenshot25.PNG). * ***inserter.py*** is designed to take an heap string and add values to that heap. It also will add new layers by adding the correct amount of Null characters. This is what the tree looks like in heap form now.![image](src/screenshot22.PNG). The function to insert is very simple and the next worksheet builds on a similar method so it will be very useful. ![image](src/screenshot23.PNG) When we run our new characters to be inserted ![image](src/screenshot24.PNG) we get ![image](src/screenshot25.PNG).
* ***morse.py*** To simple update the binary tree with new values we just add it to **initTree()** like this. ![image](src/screenshot26.PNG) * ***morse.py*** To simple update the binary tree with new values we just add it to **initTree()** like this. ![image](src/screenshot26.PNG)
* ***unittesting*** after testing some of the new values we get no unexpected errors. ![image](src/screenshot27.PNG) * ***unittesting*** after testing some of the new values we get no unexpected errors. ![image](src/screenshot27.PNG)
___
## Demos
* ***Task 1:***
<iframe width="560" height="315" src="https://www.youtube.com/embed/AjLuZGTohQ0" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
* ***Task 2:***
<iframe width="560" height="315" src="https://www.youtube.com/embed/DksW8h8woP4" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
* ***Task 3:***
<iframe width="560" height="315" src="https://www.youtube.com/embed/ofvF_PM0YXk" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
* ***Task 4:***
<iframe width="560" height="315" src="https://www.youtube.com/embed/8c6kVIacqw0" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
___
## Getting Started ## Getting Started
* To include it in another file: * To include it in another file:
......
...@@ -153,6 +153,6 @@ def decode(value): ...@@ -153,6 +153,6 @@ def decode(value):
if __name__ == '__main__': if __name__ == '__main__':
print("=== Task 2 by Jack H ===") print("=== Task 2 by Jack H ===")
print(f"Encode ('Task 2 by Jack H'): {encode('Task 2 by Jack H')}") print(f"Encode ('Task 2 by Jack H &'): {encode('Task 2 by Jack H &')}")
print(f"Decode ('- .- ... -.- ..--- -... -.-- .--- .- -.-. -.- ....): {decode('- .- ... -.- ..--- -... -.-- .--- .- -.-. -.- ....')}") print(f"Decode ('- .- ... -.- ..--- -... -.-- .--- .- -.-. -.- .... .-...'): {decode('- .- ... -.- ..--- -... -.-- .--- .- -.-. -.- .... .-...')}")
print("========================") print("========================")
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment