Python Programming MST Paper:Chandigarh University 2024-25

Python Programming Paper

Subject Code: 24CAT-606
Time: 1 Hours | Max Marks: 20

Section A

(5 × 2 = 10 Marks)

  1. Enumerate four reasons why Python is popular for programming. (CO1)
  2. Explain the purpose and usage of nested loops in Python. Provide an example demonstrating nested loop usage. (CO1)
  3. Outline the concept of dictionary comprehension in Python. (CO2)
  4. Demonstrate the purpose of the return statement in a function and explain with the help of example. (CO2)
  5. State the purpose and usage of the map() function in Python. (CO2)

Section B

(2 × 5 = 10 Marks)

  1. Analyze a Python program that prompts the user to enter a sentence and counts the number of vowels in it. Display the result as output. (CO3)
  2. Describe if, if-else, and switch statements in Python. Compare and contrast their functionalities with examples. (CO1)

Leave a Comment

icoteky.com