Download presentation
Presentation is loading. Please wait.
1
Year 10 & 11 Programming Similar, But Different!
Practice Tasks covering the types of tasks that you may be asked to complete as part of your NEA – These are not the actual tasks!
2
SBD Task Background Hashing is used for bit coin mining, banking, and saving passwords safely. It is a way to check for errors in data without giving away what the data actually is. For hashing to work, the original data must be entered in & processed using a hashing algorithm. When the data is checked, it is rehashed & the two hashed codes are checked against each other.
3
SBD Task 1 Write a program that allows a user to enter a username & password. The password must be longer than 6 characters and must not be just a number. The password must then be saved as a hashed value using the following steps: Take in a password Get ASCI number Double every other letter Add all the numbers together to make a hash code p a s w o r d 112 97 115 119 111 114 100 194 230 222 200 = 1306
4
SBD Task 1 – STEP 1 Write a program that allows a user to enter a username & password. The password must be longer than 6 characters and must not be just a number. The password must then be saved as a hashed value using the following steps: Take in a password Get ASCI number Double every other letter Add all the numbers together to make a hash code p a s w o r d 112 97 115 119 111 114 100 194 230 222 200 = 1306
5
How does your flowchart compare?
How could you make improvements?
6
What is the difference between a local & global variable?
Why would the function use a local variable?
7
SBD Task 1 – STEP 1
8
SBD Task 1 – STEP 1
9
SBD Task 1 – STEP 2 Write a program that allows a user to enter a username & password. The password must be longer than 6 characters and must not be just a number. The password must then be saved as a hashed value using the following steps: Take in a password Get ASCI number Double every other letter Add all the numbers together to make a hash code p a s w o r d 112 97 115 119 111 114 100 194 230 222 200 = 1306
11
How have we updated the flowchart?
What new symbol has been added?
12
How have we updated the flowchart?
What new symbols have been added?
13
Why is it possible to use the variable name password twice?
Is the second ‘password’ really a variable, or is it something else…
14
SBD Task 1 – STEP 2 (THE FUNCTION)
15
SBD Task 1 – STEP 2 (the function)
16
SBD Task 1 – STEP 2 (the MAIN CODE)
17
SBD Task 1 – STEP 2 (the MAIN CODE)
What did we need to update in the main code to include the hashing algorithm? Why not just include it here?
18
SBD Task 1 – STEP 3 Write a program that allows a user to enter a username & password. The password must be longer than 6 characters and must not be just a number. The password must then be saved as a hashed value using the following steps: Take in a password Get ASCI number Double every other letter Add all the numbers together to make a hash code p a s w o r d 112 97 115 119 111 114 100 194 230 222 200 = 1306
19
What is MOD & DIV?
20
How have we updated the flowchart?
How are we deciding is a number is even?
21
SBD Task 1 – STEP 3 (the function)
22
SBD Task 1 – STEP 3 (the function)
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.