Fundamentals of Programming Quiz: Test Your Coding Basics – Set 01

In today’s world, technology is integrated into nearly every aspect of our lives. From smartphones to automation, coding powers the tools we use daily. While programming might seem like a skill reserved for developers, the truth is that everyone can benefit from learning the basics. Whether you’re a student, a business owner, or a professional in any field, understanding programming empowers you to make better decisions, solve problems, and stay ahead in the digital age.

Multiple-Choice Questions (MCQs) Quiz on Basic Programming

1. What does HTML stand for?

  1. Hypertext Markup Language
  2. High-Level Text Machine Learning
  3. Hyper Transfer Machine Language
  4. Home Tool Modern Language
Show answer

✅ Answer: A) Hypertext Markup Language

HTML (HyperText Markup Language) is the standard language used to create web pages, structuring content with tags like <p> for paragraphs, <h1> for headings, and <a> for links. It acts as the skeleton of a website, giving shape to text, images, and links before design and styling are added with CSS. For beginners, learning HTML is the essential first step toward building and understanding how websites work

2. What is the primary function of loops in programming?

  1. To store data
  2. To execute a block of code multiple times
  3. To define variables
  4. To print data to the screen
Show answer

✅ Answer: B) To execute a block of code multiple times

Loops in programming are used to repeat a set of instructions until a condition is met. They help avoid writing the same code multiple times, making programs more efficient and easier to manage. In simple terms, loops let computers “do something again and again” automatically.

3. Which language is commonly used for web development?

  1. Python
  2. C++
  3. JavaScript
  4. Swift
Show answer

✅ Answer: C) JavaScript

JavaScript is the go-to language for web development because it runs directly in browsers, making websites dynamic and interactive. Alongside it, Python and TypeScript are increasingly used for backend logic and scalable projects, but JavaScript still dominates as the primary web language.

4. What does ‘Python’ primarily refer to in programming?

  1. A snake species
  2. A scripting language
  3. A cloud storage system
  4. A database tool
Show answer

✅ Answer: B) A scripting language

🐍 Python is a beginner-friendly programming language known for its simplicity and readability.
It’s widely used in web development, data analysis, artificial intelligence, and automation.
Think of Python as a versatile tool that lets you build projects quickly without worrying about complex syntax.

5. In programming, what does ‘variable’ mean?

  1. A constant value
  2. A container for storing data
  3. A type of algorithm
  4. A hardware device
Show answer

✅ Answer: B) A container for storing data

🔑 In programming, variables are like containers that store data values.
They let you give a name to information (like numbers, text, or true/false values) so you can reuse and manipulate it easily in your code.
Think of a variable as a label on a box where you keep something safe and can change it whenever needed.

6. What is the output of print(2 + 3 * 4) in Python?

  1. 20
  2. 14
  3. 24
  4. 15
Show answer

✅ Answer: B) 14

In Python, the expression print(2 + 3 * 4) follows the order of operations (also called precedence).
Multiplication happens before addition, so first 3*4=12. Then 2+12=14.
👉 The output will be 14.

Think of it like math rules: do multiplication first, then addition

7. Which of the following is NOT a programming language?

  1. Java
  2. Swift
  3. HTML
  4. Photoshop
Show answer

✅ Answer: D) Photoshop

8. What is the purpose of CSS in web development?

  1. Creating databases
  2. Styling web pages
  3. Defining server configurations
  4. Writing backend code
Show answer

✅ Answer: B) Styling web pages

🎨 CSS (Cascading Style Sheets) is used in web development to control the look and design of web pages.
While HTML builds the structure (headings, paragraphs, images), CSS adds style—like colors, fonts, spacing, and layouts.
In simple terms, HTML is the skeleton, and CSS is the clothing that makes a website visually appealing and user-friendly.

9. What does ‘Open Source’ software mean?

  1. Software is available for free, but with restricted access
  2. Software whose source code is freely available for modification
  3. Software created only for government use
  4. Software that does not require coding
Show answer

✅ Answer: B) Software whose source code is freely available for modification

🖥️ Open Source software means the program’s source code is freely available for anyone to view, use, modify, and share.
It encourages collaboration, transparency, and community-driven improvements, unlike proprietary software where the code is hidden.
In simple terms, open source lets developers worldwide work together to make software better and more adaptable.

10. Which programming language is most commonly used for artificial intelligence (AI)?

  1. PHP
  2. Python
  3. CSS
  4. Assembly
Show answer

✅ Answer: B) Python

Python is the most commonly used programming language for artificial intelligence (AI). It dominates AI development because of its simplicity, readability, and vast ecosystem of libraries like TensorFlow, PyTorch, and scikit-learn.

Final Thoughts

Programming is not just for software engineers; it’s a valuable skill for everyone. Whether you’re automating tasks, building projects, or just improving problem-solving abilities, coding is a powerful tool that enhances productivity and creativity. Start small, explore different languages, and embrace the world of programming—it’s an investment in your future.

More Quizzes in the Fundamentals Series

Scroll to Top