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
Q

How to call an array

A

Print( name of array and array number)
Eg print(rower [4])

26
Q

How to open a file

A

File = open(“file.txt”)

27
Q

How to create new file

A

Newfile(“myfile.txt”)

28
Q

How to write lines in a file

A

Writeline()

29
Q

How to read lines form a file

A

Readline()

30
Q

How to close file

A

Close ()

31
Q

What is procedure

A

A set of instructions that can be called under 1 name that do not return data

32
Q

Functions

A

Are sets

33
Q

What is a local variable ?

A

A variable that can only be used in the structure that declared in

34
Q

What is a global variable?

A

Variables that can be used any time after the declaration

35
Q

What is a high level language?

A

Source code that is easy for human to write as it is close to English

36
Q

What are low level language

A

Languages that are hard for human to write as they a far from English

37
Q

What language to computers understand

A

Machine code

38
Q

Why do we need translators

A

To translate high level languages into machine code

39
Q

What are the two types of translators

A

Compiler and interpreter

40
Q

What does an interpreter do?

A

Translate code on instruction at a time
Needed every time the program is run
Will return the first error
Slower

41
Q

What does a compiler do?

A

Translates the while script
Only need once
Returns list of errors
Runs quicker

42
Q

What is a IDE

A

Integrated development environment a piece of software to help the developers

43
Q

Features of an IDE

A

Translators
Auto documents
Graphical user interfaces