Presentation is loading. Please wait.

Presentation is loading. Please wait.

A Level Computing#BristolMet Session Objectives#U2S11 MUST identify built-in string manipulation functions SHOULD correctly use string manipulation functions.

Similar presentations


Presentation on theme: "A Level Computing#BristolMet Session Objectives#U2S11 MUST identify built-in string manipulation functions SHOULD correctly use string manipulation functions."— Presentation transcript:

1 A Level Computing#BristolMet Session Objectives#U2S11 MUST identify built-in string manipulation functions SHOULD correctly use string manipulation functions COULD combine string manipulation in a working program Create a password strength indicator program

2 A Level Computing#BristolMet Key Words

3 A Level Computing#BristolMet String Manipulation - Extraction Most languages have built-in functions to extract part of a string, often being called LEFT, RIGHT or MID LEFT (, ) i.E LEFT (“Computing”, 3) returns “Com” but MID (,, ) i.e (“Computing”, 4, 3) returns “put” TASK: Experiment with the string extract functions using Python and then Javascript. Is the syntax and logic the same?

4 A Level Computing#BristolMet String Manipulation – Length Again,,most languages have a function to calculate the number of characters in a particular string, usually: LENGHTH ( ) i.e LENGTH ( ) returns 9 TASK: Try this in Python or Javascript. It is particularly useful validate passwords and increase strengths based on the numbers of characters used. EXT: Design, create and test a program that will encourage strong passwords to be used. What will you have to do first in order to write a suitable software solution?

5 A Level Computing#BristolMet Password Program Problem analysis: The program MUST Take user input and store as string Measure length of string Make decision based on length whether Strong, Medium or Weak Output Decision

6 A Level Computing#BristolMet String Manipulation - Locate Another common in-built function is facilitate the ability to search a string for certain sequences of characters. i.e LOCATE (, This varies between languages LOACTE (“put”, “Computing”) would return 4 as it is found from the 4 th character along in the string. TASK: Attempt in Python or Javascript and test to see working by getting results of 0 and above. TASK 2: Complete Questions 1-2 in the Activity on p.106 EXT: Create the program in Q3.


Download ppt "A Level Computing#BristolMet Session Objectives#U2S11 MUST identify built-in string manipulation functions SHOULD correctly use string manipulation functions."

Similar presentations


Ads by Google