Preskoči na glavni sadržaj
Prijava
Sign up for FREE
arrow_back
Biblioteka

APCSP Algorithm (MCQ)

star
star
star
star
star
Posljednje ažuriranje 10 months ago
19
Napomena autora:

Remember AP CSP is language agnostic, that is no specific langauge in mind.

Remember AP CSP is language agnostic, that is no specific langauge in mind.

4
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
Pitanje 1
1.

Select all that is true!!

Pitanje 2
2.

Which of the following variable names would be considered valid in most programming languages but not self-identifying in purpose?

Pitanje 3
3.

If a variable num is set to 10.5, if precision is needed which data type would best represent it in a language that supports int, float, and double?

Pitanje 4
4.

What is the result of the expression 15 MOD 4 * 3? (Assume CSP’s MOD has precedence similar to multiplication)

Pitanje 5
5.

Given the list grades ← [90, 85, 70, 100], what will DISPLAY(grades[2]) output if list indexing starts at 1?

Pitanje 6
6.

If you have a list called names and want to add an item to the end of the list, which function would you use?

Pitanje 7
7.

Which of the following statements correctly describes an algorithm that uses REPEAT UNTIL x = 10?

Pitanje 8
8.

In a nested conditional structure, which statement is true about the IF conditions?

Pitanje 9
9.

age = 23

def change():

#global age

age += 3

change()

print(age)

Is age within the change function global or local? What will be printed to the screen

Pitanje 10
10.

age = 23

def change():

#global age

age = 3

change()

print(age)

Is age within the change function global or local? What will be printed to the screen

Pitanje 11
11.

age = 23

def change():

global age

age = 3

change()

print(age)

Is age within the change function global or local? What will be printed to the screen

Pitanje 12
12.

If a function calculateDiscount(price) modifies price inside but does not return any value, which of the following statements is correct? Assume we have a price variable already created before the function

Pitanje 13
13.

What will DISPLAY(sum / count) output if sum ← 25 and count ← 0?

Pitanje 14
14.

A problem is said to be undecidable if:

Pitanje 15
15.

What is the primary purpose of using parameters in a procedure?

Pitanje 16
16.

If a procedure has a RETURN statement, what happens to the value when the procedure is called?

Pitanje 17
17.

Which of the following is a benefit of modularity in programming?

Pitanje 18
18.

Briefly differentiate between parameters and attributes

Pitanje 19
19.

name = "John"

print(type(name))

When I run the code, what is printed to the screen?