100% de satisfacción garantizada Inmediatamente disponible después del pago Tanto en línea como en PDF No estas atado a nada 4.2 TrustPilot
logo-home
Examen

APCSP EXAM QUESTIONS AND ANSWERS

Puntuación
-
Vendido
-
Páginas
6
Grado
A+
Subido en
18-10-2024
Escrito en
2024/2025

APCSP EXAM QUESTIONS AND ANSWERS...

Institución
APCSP
Grado
APCSP









Ups! No podemos cargar tu documento ahora. Inténtalo de nuevo o contacta con soporte.

Escuela, estudio y materia

Institución
APCSP
Grado
APCSP

Información del documento

Subido en
18 de octubre de 2024
Número de páginas
6
Escrito en
2024/2025
Tipo
Examen
Contiene
Preguntas y respuestas

Temas

Vista previa del contenido

APCSP EXAM QUESTIONS AND
ANSWERS

Consider the code fragment shown below.

From temp to x, then x to y.

y ← temperature
Based on the code snippet, how would you best describe what the program is
doing with variables x and y? - ANSWER The program swaps the values of x
and y.

Consider the code fragment shown below.

DISPLAY: "What is your name?" name ↑ INPUT () DISPLAY ("Hello").
Display (name)
What happens if the user types "Karel" into the program? - ANSWER What's
your name? Hello, Karel.

Consider the code fragment shown below.

PROCEDURE: Mystery (number) { RETURN ((number MOD 2) = 0) }
Which of the following most accurately defines the Mystery PROCEDURE's
behaviour? - ANSWER Returns whether an integer is even.

The starting values of a and b in the program below are 0 and 1, respectively.

IF (b = 0)
{ IF (b = 1) { DISPLAY ("Karel") } `
ELSE
{ IF (a = 1) { DISPLAY ("Tracy") }
ELSE
{ DISPLAY ("Dog") } DISPLAY ("Turtle")
What appears as a result of executing this program? - ANSWER: Dog Turtle

, Consider the code fragment shown below.

PROCEDURE Mystery (number) { DISPLAY ("WOW").
REPEAT NUMBER OF TIMES { DISPLAY ("!") } `
What happens when you call the Mystery procedure with an input of 3? -
ANSWER: WOW!!

Consider the code fragment shown below.

X = RANDOM (1, 10)
Y = RANDOM (10, 20)
DISPLAY (x=y)
Which of the following most accurately reflects the code's behavior? -
ANSWER The software may display either true or false.

Consider the code fragment shown below.

PROCEDURE: Mystery (word, list).
{ For each item in the list.
{ IF (item = word) { RETURN (true) } } RETURN (false) `
Which of the following most accurately defines the Mystery PROCEDURE's
behavior? - ANSWER Return whether a word is in the list.

Consider the code fragment shown below.

PROCEDURE: Mystery (word, list).
{` x ← 0 y ← 0 FOR EACH ITEM IN LIST { IF (item = word) { x ← x + 1 }
ELSE { x ← 0 }

IF (x > y)
{y←x}}
RETURN (y);
What is the value of?

Mystery("karel"); ["karel", "karel", "tracy", "karel", "karel", "karel", "tracy"] -
Answer three.

Consider the code fragment shown below.
$11.49
Accede al documento completo:

100% de satisfacción garantizada
Inmediatamente disponible después del pago
Tanto en línea como en PDF
No estas atado a nada


Documento también disponible en un lote

Conoce al vendedor

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
luzlinkuz Chamberlain University
Seguir Necesitas iniciar sesión para seguir a otros usuarios o asignaturas
Vendido
1427
Miembro desde
4 año
Número de seguidores
849
Documentos
27650
Última venta
2 días hace

3.7

303 reseñas

5
131
4
61
3
54
2
17
1
40

Recientemente visto por ti

Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes