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

Python Previous Year Questions Paper

Uploaded by

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

Python Previous Year Questions Paper

Uploaded by

Shweta Kaul
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 2
Roll No. .............. TBS-—603 B. SC. (CS) (SIXTH SEMESTER) MID SEMESTER EXAMINATION, April/May, 2022 PYTHON PROGRAMMING Time : 1% Hours Maximum Marks : 50 Note : (i) Answer all the questions by choosing any one of the sub-questions. (li) Each sub-question carries 10 marks. 1. (a) List the different application areas of python programming language. 10 Marks (CO1) OR (>) Illustrate the different types of control flow statements available in Python with flowcharts. Define the use of else clause in all control flow statements. 10 Marks (CO1) 2 (a) ‘What is a function ? How to define a function in python ? Write a Program using function to find out the given string is palindrome or not. 10 Marks (CO5) OR (b) What is list ? How to define and access the elements of list ? Explain Jive inbuilt functions used for processing list. 10 Marks (COS) PTO. @ 1. (@ List out five useful string methods which supports in python. Explain with an example for each method, 10 Marks (CO4) OR (by Write « python program to find the mean, median and mode for a given list of numbers. 10 Marks (CO4) 4. (a) What is Dictionary in python ? Write a python program to count the frequency of words in a string, the output should be displayed in a dictionary format where each unique word of string will be the key and its frequency will be the value of dictionary. ; Sample Input : I love python programs python programs are short. Sample Output : (‘I': 1, ‘love’: 1, ‘python’: 2, ‘programs": 2, ‘are’: 1, *short’: 1} 10 Marks (COS and CO3) OR (b) Write Python Program to reverse a qumber and alse find the sum of digits in the reversed number. Prompt the user for input. 10 Marks (CO4 and 003) 5. (a) Discuss the different operators in Python. Describe specifically about identity operator and membership operator. 10 Marks (CO2) OR (b) “Strings are immutable data types” explain. Write Python program to count the total number of vowels, consonants and blanks in a string. 10 Marks (CO2) 50

You might also like