0% found this document useful (0 votes)
698 views2 pages

Python Unit Test - 1 Paper

This document is a practice test paper for a Python programming course. It contains two questions with multiple parts. Question 1 has 8 subparts asking students to distinguish lists and tuples, list Python features, explain for loops and keywords, and more. It is worth 12 marks. Question 2 has 3 subparts where students must write Python functions, find spy numbers, or explain sets and methods. It is worth 8 marks. The test is for a 5th semester undergraduate business program and covers core Python concepts.

Uploaded by

nanekaraditya06
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
698 views2 pages

Python Unit Test - 1 Paper

This document is a practice test paper for a Python programming course. It contains two questions with multiple parts. Question 1 has 8 subparts asking students to distinguish lists and tuples, list Python features, explain for loops and keywords, and more. It is worth 12 marks. Question 2 has 3 subparts where students must write Python functions, find spy numbers, or explain sets and methods. It is worth 8 marks. The test is for a 5th semester undergraduate business program and covers core Python concepts.

Uploaded by

nanekaraditya06
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Indira College of Commerce and Science, Pune

UNIT TEST – I
Semester: V Program: TYBBA-CA Course Code: CA-504 Total Marks: 20
Course Name: Python Day & Date: Friday, 15th Sept.-2023 Time: 60 Minutes

Q.
No.
1 Attempt any Six from the following: [6*2 = 12 Marks]
a. Distinguish between List and Tuple.
b. Enlist any FIVE features of Python.
c. Explain the syntax of for loop with sample example.
d. Predict the output :
for x in range(3,8):
for y in range(5,9):
if x * y > 8:
break
print(x * y)

e. List any EIGHT keywords in Python.


f. Explain str.split() function with suitable example.

g. Create a dictionary with elements in Python by any FOUR preferred ways.


h. Enlist all the Arithmetic, Bitwise, and Identity operators in Python.
2 Solve the following : (Any two) [2*4 = 08 Marks]
a. Write a Python script using function named getTotal() which receives a non-
empty list from the user and returns the sum of integer elements.
Example: Assume the input list is [2.5, 9, “ICCS”, 21, [2,3,4], 6-7j, 5, 7.2].
Pass it to the function getTotal(). getTotal() should return the addition of integer
elements. So, the expected output is 35.
b. Write a Python script to print all the spy numbers in the range of 100 to 2000.
Definition : A Number is a Spy number if the sum of its digits is equal to the
product of its digits.
(Example: num = 312, sum_of_digits = 3+1+2 = 6, prod_of_digits = 3*1*2 = 6)
c. What is set? Explain its methods with suitable example.

***************************END***************************

Use backside of this paper for rough work.

You might also like