Data Types
Programming Concepts
Tracing
Programming Basics
100

what is the data type of a number such as 1

Integer

100

What is the process of making a program run faster through improvement of code?

Optimization

100

What is the output?

x <- list [1, 3, 6, 30]

y <- x.get(4) 

output y

30

100

What index does an array in the AP CSP language start with?

1

200

What is the joining of two strings called

Concatenation

200

What is abstraction

Representing a complex topic with simpler means by generalizing features
200

What range of numbers can be produced by this program?

x <- random 3, 300

y <- random 50, 51

output random x,y

3, 300

200

fill the blank

[blank] (x equals 3)

{

   code here

}

if 

300

How many bits does a boolean use?

1

300

What is the time complexity of a linear search?

O(n)

300

What is the error in this code?


x <- 3

if x => 3 

{

 output "x is greater than three"

}

else 

{

output "x is not greater than three"

}

if should be > not => as it includes 3

(logic error)

300

What is debugging?

Going through the code and fixing errors in the code

400

what is the difference between an integer and a float/double 

integer can only store whole numbers while floats or doubles are used for decimals

400

What is the time complexity of a binary search?

O(log(n))

400

x = true

y = false

output x && (NOT(y || false))

true

400

Name the three major error types

Syntax  (mistype)

Runtime (happens during the running of the code)

Logic (incorrect numbers for example)

500

How many ints can a integer store?

32

500

In what scenario is the time complexity of a linear search the same as the time complexity of a binary search? [also put the time complexity)

Best case scenario O(1)

500

What is the output of this code?

int x = 0

for (1 to 10)

{

     for (3 to 8) 

      { 

           x = x + 1

      }

}

output x

50

500

What is a library

An external collection of programs and codes that can be imported/used by a programmer to allow themselves to use other people's code with ease in their own programs without needing to copy and paste individual lines of code.
M
e
n
u