– Foundations 2025-2026 || Questions
with Correct Detailed Answers ||
Already Graded A+
<Newest Version>
1. What is the difference in a procedure and a function? - ANSWER ✔ A
procedure and a function in python are the same so there is no
difference. They both take inputs and may or may not return outputs.
2. What is a parameter? - ANSWER ✔ Input to a procedure or function
3. What is the difference in an input, an operand, and a parameter? -
ANSWER ✔ Nothing! They are all different names used to describe
inputs to a procedure.
4. What are the advantages of using a function? - ANSWER ✔ Functions
can be used multiple times. They provide a modular piece of code that
only has to be written once and then can be called upon multiple times
within the program.
5. When does a function execute? - ANSWER ✔ When you explicitly ask
it to execute by calling the function and passing in any parameters. We
refer to this as invoking or calling the function.
6. How do you define outputs for a function? - ANSWER ✔ Using the
return keyword you can define what data will be returned or output
when the procedure or function runs. You can only access data from
within a function if you return that specific data to be used outside of the
function.
, 7. How is a while loop constructed in Python? What is its purpose? -
ANSWER ✔ executes any number of times, continuing as long as the
test expression is True
while <TestExpression>:
<Block>
8. How is an if else statement constructed in Python? What is its purpose? -
ANSWER ✔ provides a way to control what code executes based on the
result of a test expression
if <TestExpression>:
<block>
else:
<block>
9. How are compound mathematical expressions evaluated in Python? -
ANSWER ✔ First perform calculations within parentheses.
Next work left to right and perform all multiplication and division.
Finally, work left to right and perform all addition and subtraction
10.What is the function of parentheses, (), in programming expressions? -
ANSWER ✔ When we are working with an expression, they group
items within that expressions. Items within parentheses are evaluated
first. For example:
(5 + 3) * 8 = 64 because we do the addition first, then multiplication
5 + 3 * 8 = 29 because we do the multiplication first, then the addition.
11.Which language is dynamically typed? - ANSWER ✔ Python
12.Which language is not built on object-oriented design principles? -
ANSWER ✔ C
13.A language substantially supports a programmer creating items like
person, teacher, and students. Each item has internal data and some
operations.
Which characteristic describes that language? - ANSWER ✔ Object-oriented
14.A programmer wants a compiler to report an error if an integer variable
is assigned with a string.
,Which kind of language should the programmer use? - ANSWER ✔
Statically typed
15.A language uses tags around text to indicate how that text should be
formatted.
Which characteristic describes a language having such tags? - ANSWER ✔
Markup
16.What is a characteristic of a compiled language? - ANSWER ✔
Converts to machine language before running
17.What is a characteristic of an interpreted language? - ANSWER ✔ Runs
easily on different kinds of machines
18.What is an advantage of interpreted programs? - ANSWER ✔ They can
be modified at run time.
19.Which characteristic specifically describes a markup language? -
ANSWER ✔ Tags surround text to describe desired formatting.
20.Which characteristic specifically describes interpreted languages? -
ANSWER ✔ They can be run one statement at a time.
21.Moore's Law - ANSWER ✔ The trend of engineers reducing switch
sizes by half approximately every 2 years.
22.embedded computer - ANSWER ✔ computer inside another electrical
device.
23.Three basic instruction types - ANSWER ✔ Input, process, output
24.computer program - ANSWER ✔ set of instructions that a computer
follows to perform tasks. These tasks can be anything from playing a
video on your phone to helping a plane fly.
, 25.computer program instruction types - ANSWER ✔ Input: The program
gets data from somewhere.
Ex: Typing on a keyboard, touching a screen, reading a file, or receiving data
from the internet.
Process: The program does something with the data.
Ex: Adding two numbers together, sorting a list of names, or calculating the
average of some scores.
Output: The program sends data somewhere.
Ex: Displaying text on a screen, saving a file, or sending a message over the
internet.
26.Variables - ANSWER ✔ Variables are like containers that hold data.
Why they're called variables: The value inside a variable can change, or "vary,"
as the program runs.
Ex: x = 5 (Here, x is a variable holding the value 5)
y = x + 3 (Now, y is a variable holding the value 8 because x was 5)
27.Algorithm - ANSWER ✔ An algorithm is a sequence of instructions that
solves a problem.
Ex: Think of an algorithm as a step-by-step guide. For instance, a recipe for
baking a cake is an algorithm. It tells you what ingredients to use and the steps
to follow to bake the cake.
28.Flowchart - ANSWER ✔ a visual representation of the steps in a process
or program. It uses different shapes to represent different types of
actions or steps.
Flowchart Symbols
Oval: Represents the start and end of the program.
Parallelogram: Represents input and output operations.
Rectangle: Represents processing steps (like calculations).
Arrow: Shows the direction of the flow of steps.
29.Interpreter - ANSWER ✔ type of program that runs other programs by
reading and executing each statement one at a time.