Which kind of language is HTML?
Answer(s): B
Comprehensive and Detailed Explanation From Exact Extract:HTML (HyperText Markup Language) is a standard for structuring content on the web. According to foundational programming principles, HTML is a markup language, not a programming language, and does not involve typing (dynamic or static) or OOP.Option A: "Dynamically typed." This is incorrect. HTML is not a programming language and does not involve variables or typing. Dynamic typing applies to languages like Python or JavaScript.Option B: "Markup." This is correct. HTML is a markup language used to define the structure of web content using tags (e.g., <p>, <div>).Option C: "Statically typed." This is incorrect. HTML does not involve typing, as it is not a programming language. Static typing applies to languages like C or Java.Option D: "Object-oriented." This is incorrect. HTML lacks OOP features like classes, inheritance, or polymorphism, as it is designed for content structuring, not programming.Certiport Scripting and Programming Foundations Study Guide (Section on Markup Languages).W3Schools: "HTML Introduction" (https://www.w3schools.com/html/html_intro.asp).Mozilla Developer Network: "HTML Basics" (https://developer.mozilla.org/en- US/docs/Learn/Getting_started_with_the_web/HTML_basics).
Which expression has a value equal to the rightmost digit of the integer q = 7777?
Comprehensive and Detailed Explanation From Exact Extract:To find the rightmost digit of an integer q = 7777, we need the units digit (i.e., 7). According to foundational programming principles, the modulo operator (%) with 10 isolates the rightmost digit of a number.Option A: "10 % q."Compute: 10 % 7777 = 10 (since 10 ÷ 7777 has a remainder of 10).Result: 10 7. Incorrect.Option B: "q % 10."Compute: 7777 % 10 = 7 (remainder of 7777 ÷ 10, isolating the units digit).Result: 7 = rightmost digit. Correct.Option C: "q / 10000."Compute: 7777 / 10000 = 0.7777 (floating-point division).Result: 0.7777 7. Incorrect.Option D: "q % 10000."Compute: 7777 % 10000 = 7777 (since 7777 < 10000).Result: 7777 7. Incorrect.Certiport Scripting and Programming Foundations Study Guide (Section on Modulo Operator).C Programming Language Standard (ISO/IEC 9899:2011, Section on Multiplicative Operators).W3Schools: "Python Operators" (https://www.w3schools.com/python/python_operators.asp).
Which value would require an integer as a data type?
Answer(s): A
An integer data type is used to represent whole numbers without any fractional or decimal component. In the given options:A . The number of students in a section is a countable quantity that does not require a fractional part, making it suitable for an integer data type.B . The cost of a dinner including tax and tip would typically involve a decimal to account for cents, thus requiring a floating-point data type.C . The weights of patients are usually measured with precision and can have decimal values, necessitating a floating-point data type.D . An approximation of the number pi to five decimal places is a decimal value and would require a floating-point data type.
The use of integer data types for countable quantities is a fundamental concept in programming and can be found in introductory programming textbooks such as "Starting Out with Programming Logic and Design" by Tony Gaddis and online resources like the Mozilla Developer Network's (MDN) Web Docs on JavaScript data types./**
Which is one characteristic of an object-oriented language that is not a characteristic of a procedural or functional language?
Answer(s): D
Comprehensive and Detailed Explanation From Exact Extract:Object-oriented programming (OOP) languages are distinguished by their use of objects, which encapsulate data and behavior, and support features like inheritance, polymorphism, and encapsulation. According to foundational programming principles (e.g., Certiport Scripting and Programming Foundations Study Guide), this object-based approach is unique to OOP and not inherent to procedural or functional paradigms.Option A: "The language is optimized for recursive programming." This is incorrect. Recursion is a technique supported by many languages across paradigms, including procedural (e.g., C), functional (e.g., Haskell), and object-oriented (e.g., Java). It is not unique to OOP.Option B: "The language is based on the concept of modular programming and the calling of a subroutine." This is incorrect. Modular programming and subroutines (functions or procedures) are central to procedural languages (e.g., C) and also supported in functional languages. While OOP languages support modularity, this is not their distinguishing feature.Option C: "The language treats programs as evaluating mathematical functions." This is incorrect. This describes functional programming languages (e.g., Haskell, Lisp), which emphasize immutability and function evaluation, not OOP.Option D: "The language supports decomposing a program into objects that interact with one another." This is correct. OOP languages (e.g., Java, C++, Python) are characterized by organizing code into objects that encapsulate data and methods, interacting through messages or method calls.This is not a feature of procedural (e.g., C) or functional (e.g., Scheme) languages, which focus on procedures or functions, respectively.Certiport Scripting and Programming Foundations Study Guide (Section on Programming Paradigms).Python Documentation: "Classes" (https://docs.python.org/3/tutorial/classes.html).W3Schools: "Java OOP" (https://www.w3schools.com/java/java_oop.asp).
What is a feature of a compiled programming language?
Answer(s): C
Comprehensive and Detailed Explanation From Exact Extract:A compiled programming language is one where the source code is translated into machine code (or an intermediate form) by a compiler before execution. According to foundational programming principles (e.g., Certiport Scripting and Programming Foundations Study Guide), this process results in an executable file that can run independently of the compiler.Option A: "The program usually runs slower than an interpreted language." This is incorrect. Compiled languages (e.g., C, C++) typically produce machine code that runs faster than interpreted languages (e.g., Python), as the translation to machine code is done beforehand, avoiding runtime interpretation overhead.Option B: "The code runs directly one statement at a time by another program called a compiler." This is incorrect. A compiler translates the entire program into machine code before execution, not one statement at a time. Running code one statement at a time is characteristic of an interpreter, not a compiler.Option C: "The code must be compiled into machine code in the form of an executable file before execution." This is correct. In compiled languages like C or Java (which compiles to bytecode), the source code is translated into machine code or an intermediate form (e.g., .exe or .class files) that can be executed directly by the machine or a virtual machine.Option D: "The code does not require being translated into machine code but can be run by a separate program called a compiler." This is incorrect. A compiler's role is to translate code into machine code. Running code without translation describes an interpreted language, and the term "compiler" is misused here.Certiport Scripting and Programming Foundations Study Guide (Section on Compiled vs. Interpreted Languages).C Programming Language Standard (ISO/IEC 9899:2011).W3Schools: "C Introduction" (https://www.w3schools.com/c/c_intro.php).
Post your Comments and Discuss WGU Scripting-and-Programming-Foundations exam prep with other Community members:
Our website is free, but we have to fight against AI bots and content theft. We're sorry for the inconvenience caused by these security measures. You can access the rest of the Scripting-and-Programming-Foundations content, but please register or login to continue.