0% found this document useful (0 votes)
8 views3 pages

Python Programming Assessment Paper

This is the basic and important questions on python programming where you can practise for aptitude tests.
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)
8 views3 pages

Python Programming Assessment Paper

This is the basic and important questions on python programming where you can practise for aptitude tests.
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

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

PUDCUHERRY TECHNOLOGICAL UNIVERSITY


Continuous Internal Assessment Test I Question paper Bachelor of Technology(Computer Science and Engineering)
II Year III Semester CSUC107 Python Programming held on 01.09.2025
Time: 1.5 Hours Answer ALL Questions Maximum:25 Marks
PART – A (2x5=10 marks) ANSWER ANY 5 QUESTIONS
Answer any two *questions are to be answered compulsorily
Course Outcomes Blooms
[Link]. Question Marks (C01/C02/C03/C04/C05/ Taxonomy
Combinations) levels
2 CO1,CO2 L1
01 Why python is named as python and who invented it
2 CO1,CO2 L2
02 How to run python code in two modes
What is the output of the following statements 2 CO1,CO2 L3
PROGRAM 1
name=input("What is your name? ")
print("Hello, " + name + "!")
program 2
03* places = ['Bangalore', 'Mumbai', 'Delhi']
places1 = places
places2 = places[:]
places1[1]="Pune"
places2[2]="Hyderabad"
print(places)
Are ‘ is’operator and == operator both work in the same way 2 CO1,CO2 L3
04
Justify your answer with an example
What is a bytecode and how/when it is generated and state the 2 CO1,CO2 L2
05
purpose of it.
What will be the output of the following Python code? 2 CO1,CO2 L3
1. >> 6*3+4**2//5-8
2. Which of the following is an invalid statement?
06* 1. a=b=c=20
2. a,b,c=10,20,30
3. abc = 20 30 40
4. abc=20
What is the output of the following 2 CO1,CO2 L3
dict = {}
dict['one'] = "This is one"
dict[2] = "This is two“
tinydict = {'name': 'john','code':6734, 'dept': 'sales'}
07*
print(dict['one']) # Prints value for 'one' key
print (dict[2]) # Prints value for 2 key
print(tinydict) # Prints complete dictionary
print([Link]()) # Prints all the keys
print( [Link]()) # Prints all the values
08 Outline how does a range function work with an example 2 CO1,CO2 L1
09 What is immutable and mutable objects in python 2 CO1,CO2 L1
PART – B (Answer any two questions from 1,2,3 and any two questions from 4,5,6 )15marks
Course Outcomes Blooms
[Link]. Question Mark (C01/C02/C03/C04/C05/ Taxonmy
s Combinations) levels
Trace the output of the following python programs[step 2.5 CO1,CO2 L3,L4
by step iteration should be shown.
result = 0
for i in range(4):
01 if i % 2 == 0:
result += 1
else:
result -= 1
print(result)
2 2.5 CO1,CO2 L3,L4
x = 0
a = 5
b = 5
if a > 0:
if b < 0:
x = x + 5
elif a > 5:

1
x = x + 4
else:
x = x + 3
else:
x = x + 2
print(x)

03 2.5 CO1,CO2 L3,L4

x=0

while x < 3:

x += 1

if x == 2:

continue

print(x)

Write a python program to get a string to store car 05 CO1,CO2 L3,L4


company names with the car model like
Hyundai:venue; Tata: Nexon;Tata: Altroz; Hyundai:creta;
etc
[Note: company name and car model separated by colon
and each pair separated by ;]
04
List the cars belonging to Hyundai
Output like
Hyundai : [Creta,Venue]
Tata:[Altroz,Nexon]
List the cars arranged by the company names in arranging
order
Write a python program to take as Input id,designation 05 CO1,CO2 L3,L4
and id with names and produce a list like
1 Lecturer
2 associate professor
3 assistant professor
2 anand
1 john
3 kavitha
3 santhi
05
and the output like
Output:
[Associate professor:[ anand]
Assistant professor:
[Kavitha,santhi]
Lecture
[john]
Arrange the names in each designation in alphabetical
order
Write a python program to get as input a sentence. 05 CO1,CO2 L3,L4
Maintain a dictionary for the words in the alphabetical
order.
06 Count the number of words whIch starts with a particular
letter by taking that as input
Maintain a list which do not contain the words
‘is,if,;of,the

2
3

You might also like