1 (105 out of 106) with correction 2025 Western Governors
University
1. If a programmer wants to implement a complex mathematical
function
without writing the code from scratch, which resource should they
utilize?
A text editor
A debugger
A programming library
A compiler
2. Describe the main characteristics that distinguish integers from
floats in programming.
Integers can only be positive, while floats can be negative.
Integers are whole numbers without decimals, while
floats can represent numbers with decimal points.
Integers are used for text representation, while floats are
used for calculations.
Integers are always larger than floats.
3. If a programmer is working on a project that requires rapid
testing and debugging, which type of language would be
more suitable and why?
A compiled language, because it produces optimized
machine code for better performance.
An interpreted language, because it is easier to learn and
use than compiled languages.
A compiled language, because it provides better error
checking before execution.
An interpreted language, because it allows for
,immediate execution and testing of code
changes.
,4. Describe the process of type conversion in programming and
provide an example.
Type conversion is the method of using if statements to
determine variable types.
Type conversion is the use of loops to manipulate data
types.
Type conversion is the process of compiling code to
check for errors.
Type conversion involves changing a variable from one
data type to another, such as using int() to convert a
float to an integer.
5. What does an assignment statement do in a program?
Assigns a value to a
function Assigns a name
to a value
Assigns a variable to a function
Assigns a value to a variable
6. ____ is an interpreted language, meaning that the program code is
executed directly without compiling.
JavaScript
All of the
above C++
Java
7. Which of the following is true about assignment statements in Java?
You can change the type of a variable by redeclaring the
variable. You can assign any value at all to any variable.
, The Java compiler checks that the value being
assigned to a variable is consistent with the
variable's type.