Notice: Due to an ongoing migration of our storage and publishing system, material requested since last month will not be uploaded for the time being, and new requests are paused. All existing notes remain available.

Unit 1 subjective questions Setting up your Programming Environment; Variables, Expression and Statements

INT108 — Python Programming 20 questions with model answers. Write yours first, then compare.

Read the notes Practice MCQs
  1. Question 1 of 20

    Explain the significance of Python versions. How can a programmer check the installed Python version?

  2. Question 2 of 20

    Describe the steps required to install and configure Python on a Windows computer.

  3. Question 3 of 20

    Write a Python program that displays Hello, World! and explain how to save and run it on Windows.

  4. Question 4 of 20

    Define a variable in Python. Explain how variables are created, assigned, and updated with suitable examples.

  5. Question 5 of 20

    What is a NameError in Python? Explain common situations that cause it and methods for avoiding it.

  6. Question 6 of 20

    Distinguish between a value, a variable, and a data type in Python. Give examples of each.

  7. Question 7 of 20

    Explain Python's basic value types and show how type conversion can be performed between compatible types.

  8. Question 8 of 20

    State and explain the rules and recommended conventions for naming variables in Python.

  9. Question 9 of 20

    What are Python keywords? Explain why they cannot be used as variable names and describe how to view the keyword list.

  10. Question 10 of 20

    Define a statement in Python. Describe assignment, expression, and output statements using examples.

  11. Question 11 of 20

    Differentiate between operators and operands. Classify the major operators available in Python with examples.

  12. Question 12 of 20

    Explain the difference among /, //, %, and ** in Python. Evaluate each operator using suitable operands.

  13. Question 13 of 20

    Explain the order of operations in Python. Evaluate result = 2 + 3 * 4 ** 2 - 8 / 2 step by step.

  14. Question 14 of 20

    Discuss associativity in Python expressions. Why does exponentiation behave differently from most arithmetic operators?

  15. Question 15 of 20

    Describe the operations that can be performed on strings in Python, including concatenation, repetition, indexing, slicing, and membership testing.

  16. Question 16 of 20

    Compare arithmetic addition with string concatenation in Python. What errors can occur when incompatible types are combined?

  17. Question 17 of 20

    What is composition in programming? Explain how Python combines variables, expressions, and function calls into larger expressions.

  18. Question 18 of 20

    Develop a Python program that stores a student's name and three marks, calculates the total and average, and displays a formatted result. Explain the role of variables, operators, and composition in the program.

  19. Question 19 of 20

    Explain the purpose of comments in Python. Distinguish comments from docstrings and state good commenting practices.

  20. Question 20 of 20

    Analyze and correct the errors in the following program: class = Python, 2score = 40, total = score + bonus, and print("Total: " + total). Explain every correction.

That's unit 1

Long answers stick best when they're tested again soon. Run the MCQs on this unit, then come back to the questions you found hardest.