Questions Got Wrong 2018 Flashcards

(6 cards)

1
Q

Why is merge sort better than bubble

A

Has a consistent running time doesnt depend on how order original list is

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

Explain why using a sub program is good

A

Decomposes program making it easier to create/design each routine tested seperately
Easier to maintain as code easier to read as code is shorter
Reuse code
Quicker to develop
Build on ezisting work

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

Title=input(“enter a title”)
Year= input(“enter a year”)
Code = librarycode(title,year)
Myfile= openwrite(“bookcodes.txt”)

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

Text file for bookcode

A

Title=input(“enter a title”)
Year= input(“enter a year”)
Code = librarycode(title,year)
Myfile= openwrite(“bookcodes.txt”)
Myfile.writeline(code)
Myfile.close()

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

Explain difference between ascii and extended ascii

A

Ascii uses fewer bits, extended can represent other symbols, and represents more characters

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

What id a variable

A

Identidier for a memory location
Used to hold store a data, that can be changed while program is ran

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