Intro to Programming Tutorial menu

Intro to Programming Quiz

Answer these questions to check what you learned in this tutorial. Each one shows the right answer and a short explanation after you choose.

Before You Start

The quiz covers every lesson:

  • What programming is and how computers run code
  • Variables and data types
  • Conditions with if and else
  • Loops, functions and debugging

If a question feels hard, go back to that lesson, read the examples again, and try the quiz once more. There is no time limit.

Quiz Questions

Exercise

What is a programming language?

Exercise

Which part of the computer actually follows the instructions in a program?

Exercise

Which line creates a variable called city with the value Karachi in JavaScript?

Exercise

What is the difference between = and == ?

Exercise

A student has 65 marks. The code checks if marks >= 80 first, then elif marks >= 50. Which block runs?

Exercise

In Python, which numbers does range(1, 4) give?

Exercise

What happens if the condition of a while loop never becomes false?

Exercise

Why do programmers write functions?

Exercise

In JavaScript, what does console.log(10 + "5") show?

Exercise

When reading a Python error message, where should you look first?

Finished the quiz? Great work. Your next step is the Python Tutorial or the JavaScript Tutorial, where you will go much deeper into each language.

Learn Intro to Programming with a teacher

Join the Python Programming course at Workownix, online or in Orangi Town, Karachi, and get a certificate.

See the course Ask on WhatsApp