WGU D278 Scripting and Programing OA
Questions with 100% Correct Answers
|Verified |Latest Update
1. Which two statements describe advantages to using programming libraries?
○ Using a library prevents a programmer from having to code common tasks by
hand.
○ The programmer can improve productivity by using libraries.
2. Which two situations would be helped by using a programming library?
○ A programmer needs to perform a series of file compression tasks. These tasks
are commonly performed by programmers, and the programmer does not want to
have to code them all by hand.
○ A video game programmer needs to perform several animation tasks, all of which
are very common in the industry. The programmer does not want to have to code
each task, and they are unsure if they even know how to code a few of them.
3. What is an advantage of using a programming library?
○ There is improved programmer productivity.
4. A programmer is writing code using C. Which paradigm could the programmer be
using?
○ A procedural paradigm using static types
5. Which language has extensive support for object-oriented programming?
○ C++
6. One requirement for the language of a project is that it is based on a series of
method cals. Which type of language is characterized in this way?
○ (Self-correction: Based on standard classifications and the options provided, this
question is ambiguous. Procedural and Object-Oriented paradigms heavily rely
on function/method calls. None of the options (Static, Functional, Markup,
Compiled) directly represent this paradigm characteristic. Compiled languages
often implement these paradigms, but 'Compiled' describes the implementation,
not the paradigm's core principle. Functional languages focus on evaluation, and
Markup languages focus on structure. Without further clarification or better
options, a definitive choice isn't clear based on standard definitions.)
7. Which type of language is being used? Choose 3 terms that accurately describe
the language.(Description: interacting custom data types, information hiding, data
abstraction, encapsulation, polymorphism, inheritance; variables don't need types ahead
of time; runs on various OS without re-compiling).
○ Object-oriented
○ Interpreted
○ Dynamic
8. Which kind of language is HTML?
○ Markup
9. What is a feature of C# as a programming language?
○ The code must be compiled into machine code in the form of an executable file
before execution. (Note: Often involves an intermediate language step).
, 10. What is a characteristic of an interpreted language?
○ Can be run by a user one statement at a time
11. Which kind of languages are C, C++, and Java?
○ Compiled
12. Which characteristic distinguishes a markup language from other languages?
○ It does not perform complex algorithms, but instead describes the content and
formatting of webpages and other documents.
13. What is one characteristic of an object-oriented language that is not a
characteristic of a procedural or functional language?
○ The language supports decomposing a program into objects that interact with
one another.
14. Which characteristic specifically describes an object-oriented language?
○ Supports creating programs as items that have data plus operations
15. Which operator is helpful in determining if an integer is a multiple of another
integer?
○ %
16. Which operation should be used to check if the difference of two values is greater
than 1?
○ Subtraction
17. Which value would require an integer as a data type?
○ The number of students in a section
18. What would a string be used to store?
○ The word "positive"
19. What is the proper way to declare a student's grade point average throughout the
term if this item is needed in several places in a program?
○ variable float gpa
20. A program calculates the average miles per gallon given miles traveled and gas
consumed. How should the item that holds the miles per gallon be declared?
○ Variable float milesPerGallon
21. It is given that integer x = 41 and integer y = 16. What is the value of the
expression (x%8)−y?
○ -15
22. Given integer x = 12 and integer y = 4. What is the value of the expression x+y/2?
○ 14
23. Which two types of operators are found in the code snippet not (g != 8)?
○ Equality and logical
24. What are two examples of equality operators?
○ ==
○ !=
25. Which expression evaluates to 14 if integer y = 13?
○ 11+y%5
26. Which expression has a value equal to the rightmost digit of the integer g =
16222?
○ g%10
27. Which data type should be used to hold the value of a person's body temperature
in Fahrenheit?
Questions with 100% Correct Answers
|Verified |Latest Update
1. Which two statements describe advantages to using programming libraries?
○ Using a library prevents a programmer from having to code common tasks by
hand.
○ The programmer can improve productivity by using libraries.
2. Which two situations would be helped by using a programming library?
○ A programmer needs to perform a series of file compression tasks. These tasks
are commonly performed by programmers, and the programmer does not want to
have to code them all by hand.
○ A video game programmer needs to perform several animation tasks, all of which
are very common in the industry. The programmer does not want to have to code
each task, and they are unsure if they even know how to code a few of them.
3. What is an advantage of using a programming library?
○ There is improved programmer productivity.
4. A programmer is writing code using C. Which paradigm could the programmer be
using?
○ A procedural paradigm using static types
5. Which language has extensive support for object-oriented programming?
○ C++
6. One requirement for the language of a project is that it is based on a series of
method cals. Which type of language is characterized in this way?
○ (Self-correction: Based on standard classifications and the options provided, this
question is ambiguous. Procedural and Object-Oriented paradigms heavily rely
on function/method calls. None of the options (Static, Functional, Markup,
Compiled) directly represent this paradigm characteristic. Compiled languages
often implement these paradigms, but 'Compiled' describes the implementation,
not the paradigm's core principle. Functional languages focus on evaluation, and
Markup languages focus on structure. Without further clarification or better
options, a definitive choice isn't clear based on standard definitions.)
7. Which type of language is being used? Choose 3 terms that accurately describe
the language.(Description: interacting custom data types, information hiding, data
abstraction, encapsulation, polymorphism, inheritance; variables don't need types ahead
of time; runs on various OS without re-compiling).
○ Object-oriented
○ Interpreted
○ Dynamic
8. Which kind of language is HTML?
○ Markup
9. What is a feature of C# as a programming language?
○ The code must be compiled into machine code in the form of an executable file
before execution. (Note: Often involves an intermediate language step).
, 10. What is a characteristic of an interpreted language?
○ Can be run by a user one statement at a time
11. Which kind of languages are C, C++, and Java?
○ Compiled
12. Which characteristic distinguishes a markup language from other languages?
○ It does not perform complex algorithms, but instead describes the content and
formatting of webpages and other documents.
13. What is one characteristic of an object-oriented language that is not a
characteristic of a procedural or functional language?
○ The language supports decomposing a program into objects that interact with
one another.
14. Which characteristic specifically describes an object-oriented language?
○ Supports creating programs as items that have data plus operations
15. Which operator is helpful in determining if an integer is a multiple of another
integer?
○ %
16. Which operation should be used to check if the difference of two values is greater
than 1?
○ Subtraction
17. Which value would require an integer as a data type?
○ The number of students in a section
18. What would a string be used to store?
○ The word "positive"
19. What is the proper way to declare a student's grade point average throughout the
term if this item is needed in several places in a program?
○ variable float gpa
20. A program calculates the average miles per gallon given miles traveled and gas
consumed. How should the item that holds the miles per gallon be declared?
○ Variable float milesPerGallon
21. It is given that integer x = 41 and integer y = 16. What is the value of the
expression (x%8)−y?
○ -15
22. Given integer x = 12 and integer y = 4. What is the value of the expression x+y/2?
○ 14
23. Which two types of operators are found in the code snippet not (g != 8)?
○ Equality and logical
24. What are two examples of equality operators?
○ ==
○ !=
25. Which expression evaluates to 14 if integer y = 13?
○ 11+y%5
26. Which expression has a value equal to the rightmost digit of the integer g =
16222?
○ g%10
27. Which data type should be used to hold the value of a person's body temperature
in Fahrenheit?