Python Basics

40 MCQs Covers Python’s history and features, installation, IDLE, comments, syntax and indentation. Also covers variable rules, data types, input() and print()

MCQs

40 questions · 35 min · 40 marks

Want to try first? Take the free Computer Science test: SDLC and Waterfall Model

Sample questions

The first 5 of 40. Try each one, then tap to see the answer.

  1. Question 1

    Which of the following is NOT a basic step in writing a program?

    • AWrite Code
    • BPaint GUI
    • CCompile/Interpret
    • DExecute
    Show answer

    Answer: B

    The basic steps are write code, compile/interpret, execute and get the output. Painting a GUI is not a basic step.

  2. Question 2

    What is Python mainly used for?

    • AHardware testing
    • BDrawing designs
    • CMaking mobile covers
    • DWeb development, data science, and automation
    Show answer

    Answer: D

    Python is widely used for web development, data science, AI and automation.

  3. Question 3

    What makes Python easy to learn?

    • ASimple and readable syntax
    • BComplex syntax
    • CLow-level code
    • DLong code lines
    Show answer

    Answer: A

    Python's syntax is simple and close to English, so beginners can focus on logic.

  4. Question 4

    Python is an example of which type of language?

    • AAssembly language
    • BBinary language
    • CHigh-level language
    • DMarkup language
    Show answer

    Answer: C

    Python is a high-level, easy-to-read programming language.

  5. Question 5

    Which action is needed during Python installation so that Python can be run easily from the command line?

    • AUncheck "Add Python to PATH"
    • BCheck "Add Python to PATH"
    • CChoose a different IDE
    • DInstall only the IDE
    Show answer

    Answer: B

    Ticking "Add Python to PATH" lets you run Python from the command line without setting paths manually.

More tests in Python Programming

Practise with a free account

Save your scores, see which chapters need work, and keep a notebook of every question you got wrong.

Create free account