0% found this document useful (0 votes)
15 views

Final Set

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

Final Set

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

GOVERNMENT OF KARNATAKA

Department of Collegiate and Technical Education


GOVERNMENT POLYTECHNIC, ATHANI – 591304

Course Name Python Computer Semester III


Programming Science &
Engineering

Course Code 20CS31P Duration: 180 Date: Max.Marks :100


min

Question Problem Statement


Numbers
1
Write a Python Program to Illustrate the use of I/O statements Input the details
of students such as Register Number, Name, semester ,College
Name,Percentage and Location from the keyboard and display the same
information on the screen.

2
Write a Python program to Evaluate expressions and displays formatted
output.(string formatting using format() function)

3
Write a Python Program to Illustrate the decision making statements.
(a) Read the age of person and check whether he is eligible to vote or not (use
of if.. else statement)
(b) Write a program to determine the elder of the three Persons (use
if..elif..else)

4
Write a Python Program to Illustrate the decision making statements.
(a) Read a number and check whether its positive or negative( simple if.. else
statement)
(b) Take a year as an input from the user and determine whether its leap year or
not

5
Python programs to illustrate the use of python loops
To check whether the given number is Palindrome or not
6
Python programs to illustrate the use of python loops
(a) To check whether a given number is prime or not.
(b) To find the factorial value of any number

7
Write a python programs to Illustrate Set data types.
To create two sets using set comprehension and perform following set
operations:
(i) Union
(ii) Difference
(iii) Symmetric Difference
(iv) Intersection.

8
Write a python programs to Illustrate tuple data types.
To create a tuple and perform following operations

(i) Display the elements of tuple


(ii) Find an item using index method
(iii) Reverse all the elements
(iv) Display the elements from 3 rd position to 7th position
(v) Delete entire tuple

9 Write a python program to create a List of 10 odd numbers using List


Comprehension and perform the following:
i) Display all the elements
(ii) Find the length of list
(iii) Adding new items to list using append(), insert()
(iv) Remove certain items using pop(), remove()
(v) Find the particular item using index()

10
Create a dictionary that contains States and their capital city as the associated
values. Make up the data for five dictionary entries and demonstrate the use of
built-in function and methods.

11
Consider Two strings S1 “Tathagat” and S2 “Life should be greater than
long” Write a python program to create these 2 strings and perform the
following:
(i) Find First character in S1
(ii) Find Last but one character in S2
(iii) Find length of both strings
(iv) Reverse S1 (v) Apply center(), zfill(), lower(), upper(), replace(), find(),
join(), max(), min() methods
12
Write a python program to create two arrays (i) integer numbers array (ii)
floating point numbers array and perform following operations:

(i) Insert new elements using insert()


(ii) Remove Existing elements using pop(),remove()
(iii) print elements from beginning to a range use [:Index].
(iv) print elements from end use [:-Index]
(v) print elements from specific Index till the end use [Index:]
(vi) print elements within a range, use [Start Index : End Index]
(vii) print whole List with the use of slicing operation, use [:].
(viii) print whole array in reverse order, use [::-1]

13
Read a number from the user. Create CheckArmstrong() to determine whether
given number is Armstrong or not using python function.

14
(a)For any given positive integer find its factorial using recursive function.
(b)Create Anonymous Function using pyhon Anonymous Function

15
(10) Write a python program to Demonstrate math & random module.

16
Write a python program to Illustrate the numpy module.

17
Read the data from file and count the number of vowels and consonants present
in it Read the filename as input from the user using python file.
CIE Scheme of Evaluation

SL NO Particulars/Dimension Max.
Marks

1 Develop an algorithmic solution for the given problem 20


statement based on the documentation of each of the steps
involved, including input, output and logic.

2 Write program for the above given problem choosing relevant 20


python constructs.

3 Code, execute, test and debug the above program 30

4 Demonstrate how your program has solved the given problem 20

5 Portfolio evaluation based on aggregate of all practice sessions 10

100
Total

You might also like