Skip to main content

Introduction to Computing MCQs with Answers

Practice important Introduction to Computing MCQs with answers and explanations.

Multiple Choice Questions

Q1361: How is a function declared in pseudocode according to Python convention?
  • A: function name():
  • B: def name():
  • C: method name()
  • D: subprogram name:
View Answer
B

Q1362: What is the purpose of a function in pseudocode?
  • A: To create a new variable
  • B: To execute a sequence of statements
  • C: To define reusable blocks of code
  • D: To declare constants
View Answer
C

Q1363: How do you call a function named CalculateInterest in pseudocode?
  • A: CalculateInterest
  • B: Call CalculateInterest()
  • C: CalculateInterest()
  • D: Execute CalculateInterest
View Answer
C

Q1364: In pseudocode, how do you use a function within an if-else structure?
  • A: if (condition): ExecuteFunction else: ExecuteAnotherFunction
  • B: if (condition): Function() else: AnotherFunction()
  • C: if (condition): Function else: AnotherFunction
  • D: if (condition): {Function()} else {AnotherFunction()}
View Answer
B

Q1365: What does the pseudocode statement def Greetings(): signify?
  • A: A function named Greetings is being defined
  • B: A variable named Greetings is being declared
  • C: A class named Greetings is being initialized
  • D: A loop named Greetings is being set up
View Answer
A

Q1366: How do you specify the actions performed by a function in pseudocode?
  • A: By placing the actions inside curly braces {}
  • B: By listing the actions after the function definition
  • C: By defining the actions in a separate section
  • D: By using the function keyword
View Answer
B

Q1367: What happens when a function call is executed in pseudocode?
  • A: The function’s block of code is executed
  • B: The function’s name is printed
  • C: The function’s parameters are declared
  • D: The function’s definition is updated
View Answer
A

Q1368: Which of the following correctly represents a function that prints "Hello" three times in pseudocode?
  • A: def Greetings(): print("Hello") print("Hello") print("Hello")
  • B: def Greetings(): print("Hello") repeat 3 times
  • C: function Greetings(): print("Hello")
  • D: def Greetings(): print("Hello", 3)
View Answer
A

Q1369: What is the role of the def keyword in pseudocode?
  • A: It defines a new class
  • B: It declares a new variable
  • C: It initializes a new function
  • D: It creates a new loop
View Answer
C

Q1370: How do you end a function definition in pseudocode?
  • A: With a return statement
  • B: With an end keyword
  • C: With an exit keyword
  • D: By indenting the next line
View Answer
B

Test Your Knowledge

Take a timed quiz on Introduction to Computing

🚀 Start Quiz Now