1. Fundamentals

Programming Basics — Quiz

Test your understanding of programming basics with 5 practice questions.

Read the lesson first

Practice Questions

Question 1

Which programming paradigm focuses on organizing code into reusable blocks called objects, encapsulating data and behavior?

Question 2

In Python, which keyword is used to define a function?

Question 3

What is the purpose of a 'return' statement in a function?

Question 4

Which of the following data structures is typically used to implement a Last-In, First-Out (LIFO) behavior?

Question 5

Consider the following C++ code snippet:
cpp
int x = 10; if (x > 5) { x = x + 1; } else { x = x - 1; }

What will be the final value of x?
Programming Basics Quiz — Mechatronics Engineering | A-Warded