0% found this document useful (0 votes)
22 views5 pages

Introduction To Phython Programing

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

Introduction To Phython Programing

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

Roll No. …………………..

TCS–151
B. Tech. (CSE) (Second Semester)
EXAMINATION, 2023-24
INTRODUCTION TO PHYTHON PROGRAMING
1
Time : 22 Hours

Maximum Marks : 60
Note : Question paper has three Sections. Read carefully
instructions for each Section.

Section—A
(Very Short Answer Type Questions)

1. Attempt all questions. Each question carries 1 mark.

(a) Explain the basic application of python


programming. (CO1, UN)

(b) What do you mean by python input and output


function ? (CO1, UN)

(c) Solve the given conversion (10001.100)2 =()10.

(CO1, UN)

P. T. O.
[2] TCS–151

(d) Write a difference between remove and delete ?

(CO2, RE)

(e) Illustrate the tuples in python. (CO2, RE)

(f) Define recursive functions. (CO2, UN)

(g) Explain run time error. (CO3, RE)

(h) Describe access modifiers. (CO3, RE)

(i) What is class ? (CO3, RE)

(j) What is the difference between W and WR ?

(CO4, RE)

(k) Write the difference between compiler and


interpreter. (CO4, RE)

(l) What is object ? (CO5 RE)

Section—B

(Short Answer Type Questions)

2. Attempt all questions. Each question carries 4 marks.

(a) What is python ? Explain the various features of


python programming. (CO1, UN)

OR

What is type casting explain with the help of


example in detail ? (CO1, UN)
[3] TCS–151

(b) Explain the dictionary in python with suitable


example. (CO2, AN)
OR
Write the difference between mutable and
immutable data type in detail. (CO2, AN)
(c) Write a program in python to check if a given
number by user in an Armstrong number or not.
(CO3, EV)
OR
Explain the while loop and do while loop with the
help of suitable example. (CO3, UN)
(d) Explain the different types of function argument.
Explain with suitable example. (CO4, UN)
OR
Write a short note on following : (CO4, RE)
(i) Function calling
(ii) Pass by value
(e) Write a program to find a factorial of a given
number and print the reverse of the factorial.
(CO4, UN)
OR
Describe the functions related to dictionary with
examples. (CO4, AP)

P. T. O.
[4] TCS–151

(f) Explain the basic concept of list and explain the


concept of negative indexing with the help of
example. (CO2, UN)
OR
Read the marks of a student in four subjects. Then
calculate the total and aggregate and display the
grade obtained by the student. (CO2, AN)
(i) If the student scores an aggregate greater
than 75%, then the grade is distinction.
(ii) If aggregate is 60>=and<75, then the grade
is first division.
(iii) If aggregate is 50>=and<60, then the grade
is second division.
(iv) if aggregate is 40>=and<50, then the grade
is third division.
(v) Else the grade is fail.
Section—C
(Long Answer Type Questions)

3. Attempt all questions. Each question carries 8 marks.


(a) What are the various features of object-oriented
programming and its advantages ? (CO5, EV)
OR
What is file handing explain the mode of file
handling in detail ? (CO5, EV)
[5] TCS–151

(b) Discuss string functions used to access string


elements. Also explain the string operations ?
(CO2, EV)
OR
Write a program in python to print the pattern
given below : (CO2, UN)
*** * *
*** *
***
**
*
(c) Write short note on following : (CO3, UN)
(i) Pass statement
(ii) Continue statement
(iii) Break statement
OR
Define flow control statement with example.
(CO3, UN)

TCS–151 1,050

P. T. O.

You might also like