• ¿Documento equivocado? Cámbialo gratis
  • Escrito por estudiantes que aprobaron
  • Inmediatamente disponible después del pago
  • Leer en línea o como PDF
Vender
¿Dónde estudias?
Tu idioma
Document preview thumbnail
Vista previa 3 fuera de 25 páginas
Examen

Scripting And Programming Foundations 2026 Test Paper Solved Questions And Solutions

Document preview thumbnail
Vista previa 3 fuera de 25 páginas

SCRIPTING AND PROGRAMMING FOUNDATIONS 2026 TEST PAPER SOLVED QUESTIONS AND SOLUTIONS

Vista previa del contenido

SCRIPTING AND PROGRAMMING
FOUNDATIONS 2026 TEST PAPER SOLVED
QUESTIONS AND SOLUTIONS

◉ function P(integer x) returns integer y
y=2*x


What does P(5) evaluate to?
A2
B5
C 10
D 25. Answer: 10


◉ Function F()
Put "Hey" to output


What entire output appears after three successive calls to F()?
A Hey
B HHHey
C HeyHeyHey
D Hey Hey Hey. Answer: HeyHeyHey

,◉ What is a valid user-defined function name?
A A reserved word
B Any valid identifier
C Any variable name
D A floating-point number. Answer: Any valid identifier


◉ A function MyFct has an input x and an output z.


What does MyFct return?
A Nothing
B x only
C z only
D x and z. Answer: Z only


◉ What is the return value of a function?
A Output of a function
B Call to run the function
C Data passed to the function
D Variable in the declaration of the function. Answer: Output of a
function

, ◉ A program should continue accepting input numbers, adding each
to a sum, until a 0 is input.


Which control structure should be used?
A If statement
B For loop
C Multiple if statements
D While loop. Answer: While loop


◉ Joe is building an online game. He wants to provide a riddle and
have the player guess the answer. The game needs to prompt the
user to enter the answer, check to see if it the input provided does
not match the correct answer, and continue prompting the user until
the answer entered matches the correct answer.


Which control structure supports Joe's needs?
A For loop
B While loop
C Do-while loop
D If-else branch. Answer: Do-while loop


◉ What is put to output by the following pseudocode?

Información del documento

Subido en
7 de abril de 2026
Número de páginas
25
Escrito en
2025/2026
Tipo
Examen
Contiene
Preguntas y respuestas
$13.99

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

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.
GradeGalaxy
4.3
(20)
Vendido
240
Seguidores
6
Artículos
70326
Última venta
1 día hace



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