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.
Select all that is true!!
Which of the following variable names would be considered valid in most programming languages but not self-identifying in purpose?
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?
What is the result of the expression 15 MOD 4 * 3? (Assume CSP’s MOD has precedence similar to multiplication)
Given the list grades ← [90, 85, 70, 100], what will DISPLAY(grades[2]) output if list indexing starts at 1?
If you have a list called names and want to add an item to the end of the list, which function would you use?
Which of the following statements correctly describes an algorithm that uses REPEAT UNTIL x = 10?
In a nested conditional structure, which statement is true about the IF conditions?
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
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
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
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
What will DISPLAY(sum / count) output if sum ← 25 and count ← 0?
A problem is said to be undecidable if:
What is the primary purpose of using parameters in a procedure?
If a procedure has a RETURN statement, what happens to the value when the procedure is called?
Which of the following is a benefit of modularity in programming?
Briefly differentiate between parameters and attributes
name = "John"
print(type(name))
When I run the code, what is printed to the screen?