SQL AND DATA STRUCTURES Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

what are data structures

A

organised collections of items

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

what is an array

A

contains items of the same data type and is of fixed length

array scores[5]
array scores = [3,53,92,40,13]
print(scores[2])
scores[4]=5

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

what loop should you use to check an array

A

FOR loop

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

What is a sql

A

structures query language

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

what is sql select

A

used to search and retrieve data

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

how do you index with two numbers in a 2d array

A

print(Exams[1,2])

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

what do you write when doing sql

A

SELECT
FROM WHERE

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

what do you have to do to a file before doing anything to it

A

Open it
textfile = open(“client_data.txt”)

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

what do you need to do when youre done with a file

A

textFile.close()

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

what do you do when youre writing to a file

A

textFile.writeLine (“AJ,24,London”)

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

what do you do when trying to read a file

A

while not textFile.endOfFile()
print(MyFile.readLine())

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