Computing AC1 and AC2

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/76

flashcard set

Earn XP

Description and Tags

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No study sessions yet.

77 Terms

1
New cards

"Product development lifecycle"

"Product development lifecycle"

2
New cards

"What are the 5 stages of the product development lifecycle"

"Analysis <-> Design <-> coding <-> testing <-> launch"

3
New cards

"What are the two parts of analysis"

"Decomposition - breaking down a complex problem or system into smaller, more manageable parts Abstraction - removing unnecessary details to focus on what is important and simplify the complexity"

4
New cards

"What are the 3 parts of design"

"Structured diagram - visualise end goals Flowcharts - show how programs decomposed parts will run including any decisions or inputs needed Pseudocode - Enable ideas and problems to be read in english"

5
New cards

"What are the 2 parts of testing"

"Unit testing - testing each part individually Integration testing - testing all the code together as a program"

6
New cards

"Flowcharts & Totalling"

"Flowcharts & Totalling"

7
New cards

"What are the 6 shapes in a flowchart"

"[Diamond shape] <-> decisions [Oval shape] <-> TERMINATOR (START/END) [Parallelogram] <-> Input / output [Rectangle] <-> Process [Arrow] <-> arrows [Rectangle with double vertical lines] <-> function"

8
New cards

"What is a loop in a loop called"

"nesting"

9
New cards

"example of totalling"

"x <- 7 y <- 3 z <- x+y OUTPUT z 10"

10
New cards

"Algorithms (Min/Max & Average)"

"Algorithms (Min/Max & Average)"

11
New cards

"Minimum / maximum"

"DECLARE Numbers : ARRAY OF INTEGER DECLARE Min, i : INTEGER Numbers <- [3, 2, 4, 7, 8, 6] Min <- Numbers [1] FOR i <- 1 TO LENGTH (Numbers) DO IF Numbers [i] < Min THEN Min <- Numbers [i] ENDIF NEXT i"

12
New cards

"Average of an array"

"Numbers <-[9, 1, 7, 0, 3, 42] Min <- Numbers [1] Total = 0 For i <- 1 TO LENGTH (Numbers) DO Total <- Total + Numbers [i] Next i Avg <- Total / LENGTH (Numbers) OUTPUT "Average is ", Avg"

13
New cards

"Comparisons & Validation"

"Comparisons & Validation"

14
New cards

"What is does not equal to, equal to and does it equal to in python and pseudocode"

"python - != pseudocode - <> python - = pseudocode - <- python - == pseudocode - ="

15
New cards

"Definition of validation check"

"a check to see if data is reasonable"

16
New cards

"Name the 6 validation checks"

"Range check Length check (only works for strings) Type check Presence check Format check Check digit"

17
New cards

"Range check example"

"INPUT x OUTPUT "give number between 1-10" WHILE x < 1 or x > 10 OUTPUT "Between 1 and 10" Input x ENDWHILE"

18
New cards

"Length check example"

"INPUT Password OUTPUT "Must have min 8 chars" WHILE LENGTH (Password) < 8 OUTPUT "At least 8" INPUT Password ENDWHILE"

19
New cards

"Type check example"

"OUTPUT "Give number" INPUT Num WHILE Type (Num) <> Integer OUTPUT "Number pls" INPUT Num ENDWHILE"

20
New cards

"Presence check example"

"OUTPUT "Enter name" INPUT x WHILE x <- "" INPUT x ENDWHILE"

21
New cards

"Format check"

"Bool <- False repeat INPUT Date IF date matches "DD/MM/YY" Bool <- True Until Bool = True"

22
New cards

"Verification checks"

"Verification checks"

23
New cards

"Definition of Verification checks"

"if data has been copied correctly from one source to another"

24
New cards

"What are the two types of verification checks"

"Double entry check Visual check"

25
New cards

"double entry check example"

"INPUT A INPUT B WHILE A <> B INPUT A INPUT B ENDWHILE"

26
New cards

"Visual check example"

"User looks at string and checks it is correct"

27
New cards

"Test Data & Data Types"

"Test Data & Data Types"

28
New cards

"What is the definition of test data"

"used for checking the program works as expected where it rejects invalid data and accepts reasonable data"

29
New cards

"The 4 types + definitions + examples (1-10) - of test data"

"normal - expected to work (2,3,4,5,6,7,8,9) abnormal / erroneous - not expected to work (-1, 0, 13) extreme - at either end but valid (1, 10) boundary - either end but valid + not (0, 1, 10, 11)"

30
New cards

"Pseudocode"

"Pseudocode"

31
New cards

"When writing in pseudocode variables must be…"

"Declared"

32
New cards

"What is the comment sign"

"//"

33
New cards

"What are 5 data types + examples in pseudocode"

"Integer - whole number - 1, -1, 2, 456, -235 Real (float in python) - number able to contain decimal - 1.0, 2.3, 4.0 Char - A single character, symbol, num, punctuation - A, #, 3, ! String - sequence of characters - "happy" Boolean - logical values True and False - True, False"

34
New cards

"Variables start with ____ not _____"

"Variables start with lowercase not capital letters numbers"

35
New cards

"does python have constants"

"No"

36
New cards

"Why is assigning constant variables advantageous"

"it doesn't require declarations"

37
New cards

"Constant variable example"

"CONSTANT HourlyRate <- 6.5"

38
New cards

"f you want 30 spaces in python it's [0:30] but in pseudocode it is …"

"[1:30]"

39
New cards

"How to declare array"

"DECLARE Names : ARRAY OF STRING"

40
New cards

"What about 2D declaring"

"DECLARE Names : ARRAY [1:3, 1:3] OF STRING"

41
New cards

"Operators Add Minus Times To the power of divide integer division remainder of"

"Add + Minus - Times * To the power of ^ divide / integer division DIV remainder e.g 10 MOD 4 = 2 MOD"

42
New cards

"How to turn something into all lowercase or uppercase"

"Name <- "RISHITA" NewName <- LCASE(Name) NewBigName <- UCASE(Name)"

43
New cards

"How to get substrings in pseudocode"

"Name <- Rishita SUBSTRING(Name, 1, 5) would be Rishi SUBSTRING(Name, 3, 4) would be sh SUBSTRING(Name, 1, 7) would be Rishita"

44
New cards

"Procedures, Functions & Files"

"Procedures, Functions & Files"

45
New cards

"Procedure Example"

"PROCEDURE sayHello (start : INTEGER, end : INTEGER) For i <- Start TO end OUTPUT "Hello" Next i ENDPROCEDURE later… CALL sayHello (1, 5) ---- the output would be ------ (Hello, Hello, Hello, Hello, Hello)"

46
New cards

"what is the only diffrence between functions and procedures"

"functions have return statements"

47
New cards

"function example"

"FUNCTION add (A : INTEGER, B : INTEGER) Returns Integer DECLARE C : INTEGER C <- A + B Return C ENDFUNCTION later… TOTAL <- (5, 6) OUTPUT TOTAL ----------- 11"

48
New cards

"What are the two Filemodes"

"Read and Write"

49
New cards

"what are the ways to write the four different commands in file handling"

"To open - OPENFILE <Score.txt> For <Read> To Read - READFILE <Score.txt>, <Score> To Write - WRITEFILE <Score.txt>, <Score> To Close - CLOSEFILE <Score.txt>"

50
New cards

"What are the 3 loops / iterations"

"While - pre condition Repeat until - post condition For - count controlled"

51
New cards

"What is the other selection statement"

"if statement"

52
New cards

"What is iteration"

"the process of repeating a sequence of instructions"

53
New cards

"give coding structure for all four"

"For loops: For i <- ….. ………. Next i While loops: WHILE ……… ………. ENDWHILE Repeat until: REPEAT…. ……….. UNTIL ……….. If statement: IF ……… THEN ……… ELSEIF ……… THEN ……… ELSE ……… THEN ……… ENDIF"

54
New cards

"Other Pseudocode Stuff"

"Other Pseudocode Stuff"

55
New cards

"Which loop only works in pseudocode"

"Repeat until loops"

56
New cards

"Other pseudocode stuff"

"Other pseudocode stuff"

57
New cards

"How to generate a random number"

"for a number between 0 and 5 Round (Random ( ) * 5, 0) - the zero represents the decimal places rounded to (0 gives an integer) So for a number between 4 and 10 Round (Random ( ) * 6, 0) + 4 (10 - 4 = 6)"

58
New cards

"what is Scope"

"asking if something is local or global"

59
New cards

"what is local"

"available only inside the variable, procedure, loop"

60
New cards

"what is global"

"always available"

61
New cards

"Databases"

"Databases"

62
New cards

"What is a database"

"a table that holds data"

63
New cards

"What are the columns and rows referred to as"

"Column - Fields Rows - Records"

64
New cards

"What is SQL"

"a programming language for storing and processing info in a relational database."

65
New cards

"What is a primary key"

"a unique identifier that each table should have"

66
New cards

"What are the 6 main datatypes in SQL"

"alphanumeric / text - String (python) - BK01 Character - Char (python) - # / A Integer - Integer (python) - 45 Boolean - Boolean (python) - Yes / No Real - float (python) - 6.99 Date / time (only in SQL) - (12/12/12)"

67
New cards

"How many main words are there that can potentially be used in a SQL statement that we know so far"

"6"

68
New cards

"What are all the different SQL statements + definitions"

"SELECT - selecting the necessary field FROM - which table is being referred WHERE - The question you want the answer too ORDER BY - info in any kind of order SUM - all numbers added COUNT - how many of something there are"

69
New cards

"what does * mean"

"select all"

70
New cards

"give examples of how to use each one"

"SELECT --- FROM ---- WHERE --- ORDER BY --- (ASC or DESC) SELECT COUNT (---) FROM --- WHERE --- SELECT SUM (---) FROM -- WHERE -- SELECT * FROM -- WHERE --- SELECT COUNT (*) FROM -- WHERE ---"

71
New cards

"How many logic gates are there"

"6"

72
New cards

"what does it do - A Not gate"

"takes an input and flips it"

73
New cards

"what does it do - And Gate"

"Both inputs must be 1 for output to be 1"

74
New cards

"what does it do - Or gate"

"Atleast 1 input needs to be 1 for the output to be 1"

75
New cards

"what does it do - Nand Gate (Not + And)"

"opposite outputs of the and table outputs"

76
New cards

"what does it do - Nor Gate (Not + Or)"

"the opposite outputs of the Or gate outputs"

77
New cards

"what does it do - Xor gate (Special Or)"

"exactly one of the two inputs need to be 1 for the output to be 1 - different inputs"