Start learning →

BCA General Python Programming — practice questions

Explore 32 free Python Programming questions in BCA General Computer Science. Open each question or exercise to read its content, reference answers and available explanation.

Practise Python Programming with Quill →

Python Programming questions and exercises with answers

Showing questions 1–30 of 32.

Python converts its instructions into machine language using an:Read the answer and worked solution →Python source code files are saved with which extension?Read the answer and worked solution →In Python, a comment starts with which sign?Read the answer and worked solution →Python uses what to mark blocks and nested blocks?Read the answer and worked solution →Values that operators work on are called:Read the answer and worked solution →A dictionary in Python holds data items as:Read the answer and worked solution →Items in a Python dictionary are enclosed in which brackets?Read the answer and worked solution →Variables whose values cannot be changed after assignment are called:Read the answer and worked solution →An interpreter processes program statements in what manner?Read the answer and worked solution →Which mode lets you type a statement directly at the prompt?Read the answer and worked solution →What is the stated drawback of the interactive mode?Read the answer and worked solution →An identifier in Python cannot start with a:Read the answer and worked solution →Variable declaration in Python is described as:Read the answer and worked solution →Python's numeric data type is classified into int, complex and:Read the answer and worked solution →The three sequence data types in Python are strings, tuples and:Read the answer and worked solution →The logical operators and, or and not must be written in:Read the answer and worked solution →A Python variable refers to what, stored in memory?Read the answer and worked solution →What happens if a variable is used in an expression before assignment?Read the answer and worked solution →When an immutable variable is updated, the old variable is:Read the answer and worked solution →Tuples are used when the data needs:Read the answer and worked solution →Mapping is described as which kind of data type in Python?Read the answer and worked solution →None is described as being neither the same as zero nor:Read the answer and worked solution →Which values are False by default, apart from None and zero?Read the answer and worked solution →Python is described as portable, meaning it is independent of the:Read the answer and worked solution →Valid or invalid identifierRead the answer and worked solution →Match the Python termRead the answer and worked solution →Sort the Python data typesRead the answer and worked solution →Interactive or script modeRead the answer and worked solution →True or false about PythonRead the answer and worked solution →Complete the Python factsRead the answer and worked solution →

Worked practice questions

Python converts its instructions into machine language using an:

  1. Interpreter
  2. Interceptor
  3. Interlocker
  4. Interrupter
Show answer and solution

Correct answer: A. Interpreter

1. Source code is not directly understood by the computer. 2. A translator stands between the two. 3. Python uses an interpreter to convert its instructions into machine language. 4. So the answer is an interpreter. _Source: syllabus Computer Science, Ch 5 'Getting Started with Python'_

Open this question →

Python source code files are saved with which extension?

  1. .pe
  2. .py
  3. .pi
  4. .pa
Show answer and solution

Correct answer: B. .py

1. A script must be recognisable as Python on disk. 2. The file name carries a specific ending. 3. Python scripts are saved as files where the file name has extension.py. 4. So the answer is.py. _Source: syllabus Computer Science, Ch 5 'Getting Started with Python'_

Open this question →

In Python, a comment starts with which sign?

  1. Cash
  2. Sash
  3. Hash
  4. Dash
Show answer and solution

Correct answer: C. Hash

1. A note for the reader must be marked so the interpreter skips it. 2. One character does that marking. 3. In Python, a comment starts with the hash sign. 4. Everything after it on that line is ignored. _Source: syllabus Computer Science, Ch 5 'Getting Started with Python'_

Open this question →

How to practise

  1. Choose a Python Programming question and try to work out your answer.
  2. Open the question to check the correct answer and read its worked solution.
  3. Continue in the app for bite-sized lessons, explanations and review with Quill. You can start without creating an account.

More Computer Science topics