RH01 Scripting and Programming Foundations Version 1
Practice exam for Western Governors University WGU Exams under Western Governors University Exams (College Exams). 5 sample questions.
Sample Questions
You're viewing a limited preview. Log in and subscribe to access all questions.
Log InExam Questions
Question 1
What are two characteristics of programming libraries? (Choose 2 answers)
Correct Answer: B,E
Rationale: In programming, libraries organize related functions and typically contain multiple functions . program may include many libraries ( false). In programming, libraries are not auto-included ( false). They often improve rather than harm efficiency ( false). library rarely contains only one function ( false).
Rationale: In programming, libraries organize related functions and typically contain multiple functions . program may include many libraries ( false). In programming, libraries are not auto-included ( false). They often improve rather than harm efficiency ( false). library rarely contains only one function ( false).
Question 2
Which function would likely be found in the same library as one that produces a random number?
Correct Answer: B
Rationale: In programming, libraries group related functionality. random-number library often also includes functions to generate random characters (derived by mapping random numbers to character sets). Sorting belongs to algorithms/collections, multiplication is a primitive operation, and user input is I/O.
Rationale: In programming, libraries group related functionality. random-number library often also includes functions to generate random characters (derived by mapping random numbers to character sets). Sorting belongs to algorithms/collections, multiplication is a primitive operation, and user input is I/O.
Question 3
What is an advantage of using programming libraries?
Correct Answer: C
Rationale: In programming, libraries provide reusable, tested code that speeds development . Some are compiled/linked at different stages ( not inherent). In programming, libraries donAat inherently save disk space . Loading into memory is not the key advantage.
Rationale: In programming, libraries provide reusable, tested code that speeds development . Some are compiled/linked at different stages ( not inherent). In programming, libraries donAat inherently save disk space . Loading into memory is not the key advantage.
Question 4
Which language could be used to code using a functional programming paradigm?
Correct Answer: C
Rationale: Python supports functional programming (firstAaa class functions, lambdas, map/filter/reduce). CSS and HTML are not programming languages; LaTeX is for document preparation.
Rationale: Python supports functional programming (firstAaa class functions, lambdas, map/filter/reduce). CSS and HTML are not programming languages; LaTeX is for document preparation.
Question 5
Which language has extensive support for objects?
Correct Answer: B
Rationale: Java is designed around classes/objects. HTML/AaEMarkupAa are not programming languages; is procedural and lacks builtAaa in OOP.
Rationale: Java is designed around classes/objects. HTML/AaEMarkupAa are not programming languages; is procedural and lacks builtAaa in OOP.