Python Programming_UT1 QP
Python Programming_UT1 QP
Class: I B.Sc.(CS) ‘A’ , ‘B’ & ‘C’ Sec Maximum Marks: 50 Time:
SECTION – A 10 x 1 = 10 Marks
Choose the correct answer :
Which of the following describes Python?
1.
a) Interpreted b) Reliable c) Simple d) All of these
_______ are reserved memory locations that stores values.
2.
a) Keywords b) Variables c) String d) None of these
The input( ) function takes user’s input as a ________.
3.
a) integer b) float c) string d) character
Literals of the form a + bi are called __________ number.
4.
a) integral b) floating c) complex d) decimal
To specify more than one statement in a single line, use a ________ to separate the
5. statements.
a) , b) ; c) : d) /
Which operator gives the remainder after division?
6.
a) / b) // c) % d) **
What is the output of this code?
7. >>> int("30" + "40")
a) “70” b) “3040” c) 3040 c) (“30” + “40”)
Bitwise operator can be applied on which data type?
8.
a) integer b) float c) string d) list
What is the output of this code?
>>> float("123" * int(input(“Enter a number:”)))
9.
Enter a number: 3
a) “123123123” b) “369.0” c) 123123123.0 d) 369.0
Identify the expression that may result in arithmetic overflow.
10.
a) a * b b) a ** b c) a / b d) a + b
SECTION – B 2 x 5 = 10 Marks
Answer all the questions :
11. Describe the features and limitations of Python.
14. Write about Expressions in Python and its types with suitable coding.