Download presentation
Presentation is loading. Please wait.
1
BTEC COMPUTING – UNIT 1 SECTION B - FLOWCHARTS
SECTION A – COMPUTATIONAL THINKING DECOMPOSITION – PATTERN RECOGNITION – ABSTRACTION – ALGORITHM DESIGN - SECTION C – PROGRAMMING PARADIGMS SECTION C – PROGRAMMING PARADIGMS What is a Variable? What is a Constant? Pseudocode: Lists [arrays] Mathematical Operators Comparison Operators + == - > * < / <> or != MOD >= DIV <= ^ Creating A List names = [“Bob”, “Alex”, “Chris”] Getting An Item From A List names[1] this would output Alex Looping Through A List for i in name: output names[i] Length Of A List Output (len(names) Using A Loop To Count The Value Of Items In A List scores = [5, 12, 5, 7, 8] total = 0 for i in scores: total = total + i Data Types: String Integer Float/Real Boolean Casting: Changing the variable from one data type to another. str(3) or int(“3”) Pseudocode: String Handling Length Of A String Getting A Sub String (Part Of The String) Change String To Upper Case Change String To Lower Case Pseudocode: Functions[returns a value] Parameters (values sent for function to use) Name of function Pseudocode: Iteration For Loop [you know how many times you want to loop for i = 1 to 100: output (i) While Loop [based on a condition] count = 0 while count < 100: output(count) count = count + 1 function triple (number) return number*3 end function Pseudocode: Files Call the Function by using its name and send any parameters in brackets. E.g.: y=triple(7) Opening A File myFile = open(“computing.txt”) Reading From A File myFile = openRead(“computing.txt”) while NOT myFile.endOfFile() print(myFile.readLine()) endwhile myFile.close() Writing To A File myFile = openWrite(“sample.txt”) myFile.writeLine(“Hello World”) Pseudocode: Selection Pseudocode: Basic if entry == "a" then print("You selected A") elseif entry=="b" then print("You selected B") else print("Unrecognised selection") endif name = input (“What is your name”) output (name) or joining a string and variable together output (“your name is:” + name)
2
What is input validation?
BTEC COMPUTING – UNIT 1 SECTION C – PROGRAMMING PARADIGMS Quick Sort Bubble Sort Insertion Sort How it operates Advantages Disadvantages How it operates Advantages Disadvantages How it operates Advantages Disadvantages SECTION C – VALIDATION Binary Search Linear Search What is input validation? How it operates Advantages Disadvantages How it operates Advantages Disadvantages Validation technique Used for SECTION C – STACKS AND QUEUES Post Check Actions
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.