Topic 6 And 7 Flashcards

1
Q

What is an integer?

A

Int
Whole number only

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a float or real?

A

Numbers that can have decimal part

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a Boolean?

A

Can only take one or two values, usually true or false

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is data type character?

A

Single letter number of symbol

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is data type string?

A

Used to represent text with selection of characters

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How to workout ASCI number of the letter?

A

ASC(letter)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How to work out which ASCI number is which letter

A

CHR(code)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What does DIV

A

Divides into a whole number and has no remainder

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What does MOD Do

A

Show the remainder of a calculation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What does .upper do?

A

Changes all characters to upper case

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What does .lower do?

A

Changes all characters to lower case

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What does .length do ?

A

Returns the number of characters in a string

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What does .left do?

A

Returns the left character

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What does .right do

A

Returns right characters

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What does .substring do?

A

Extracts a substring from the string

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Describe a DO until loops

A

Controlled by a condition that has to be met
Always run at least once
You can get an infinite loop if the statement is impossible

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Describe a while loop

A

Controlled by a condition at the start
Keep going while condition is true
Never run code if condition is initially false
Get and infinite loop if conditions is always true

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Describe a logic gate

A

Triangle flowing from input to output with a circle

19
Q

Describe an and gate

A

A square with rounded top with two inputs and one output

20
Q

Describe an or gate

A

Looks like the Star Trek sign

21
Q

Function of a Not Gate

A

It reverse the input or gives the opposite input

22
Q

What is the function of an and gate

A

Both inputs must be true for a positive result

23
Q

What is the function of an or gate

A

One or more inputs must be true for a positive result

24
Q

How to code an array

A

Create be typing array “then array name” [num if element ]
Assign each element a number e.g
Array rowers [4]
Rowers [1] Alfie
Rowers [2] Sid
Rowers [3] Noah
Rower [4] jack

25
How to call an array
Print( name of array and array number) Eg print(rower [4])
26
How to open a file
File = open(“file.txt”)
27
How to create new file
Newfile(“myfile.txt”)
28
How to write lines in a file
Writeline()
29
How to read lines form a file
Readline()
30
How to close file
Close ()
31
What is procedure
A set of instructions that can be called under 1 name that do not return data
32
Functions
Are sets
33
What is a local variable ?
A variable that can only be used in the structure that declared in
34
What is a global variable?
Variables that can be used any time after the declaration
35
What is a high level language?
Source code that is easy for human to write as it is close to English
36
What are low level language
Languages that are hard for human to write as they a far from English
37
What language to computers understand
Machine code
38
Why do we need translators
To translate high level languages into machine code
39
What are the two types of translators
Compiler and interpreter
40
What does an interpreter do?
Translate code on instruction at a time Needed every time the program is run Will return the first error Slower
41
What does a compiler do?
Translates the while script Only need once Returns list of errors Runs quicker
42
What is a IDE
Integrated development environment a piece of software to help the developers
43
Features of an IDE
Translators Auto documents Graphical user interfaces