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

End Semester Examination On 13/01/2022: Name of The Student

The document is an online form for an end semester examination on Programming for Problem Solving using Python-II. It contains 22 multiple choice questions related to Python programming concepts like data types, operators, strings, lists, dictionaries, etc. The form collects student details like name, roll number, and contact information for appearing in the online exam on 13th January 2022.

Uploaded by

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

End Semester Examination On 13/01/2022: Name of The Student

The document is an online form for an end semester examination on Programming for Problem Solving using Python-II. It contains 22 multiple choice questions related to Python programming concepts like data types, operators, strings, lists, dictionaries, etc. The form collects student details like name, roll number, and contact information for appearing in the online exam on 13th January 2022.

Uploaded by

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

1/13/22, 10:57 AM End Semester Examination on 13/01/2022

End Semester Examination on 13/01/2022


PROGRAMMING FOR PROBLEM SOLVING USING PYTHON-II

[email protected] (not shared) Switch account

Draft saved

* Required

Name of the student *

Dipanjan Dhar

Section *

Roll No. *

09

Enrollment No. *

12021002029078

Contact No *

9903153787

https://docs.google.com/forms/d/e/1FAIpQLSfhj2SwyVnLU7QJnllSuQYMzy0T2Y4aMjyiU9WdxDMuS4-pbg/viewform 1/19
1/13/22, 10:57 AM End Semester Examination on 13/01/2022

Email Id *

[email protected]

1) What output will type('13.6789') give?

float

str

int

bool

Clear selection

2) What output will type(31!=25) give?

true

bool

false

str

Clear selection

3) Convert the decimal number 635 to its equivalent octal number:

34

1007

1173

Nome of these

Clear selection

https://docs.google.com/forms/d/e/1FAIpQLSfhj2SwyVnLU7QJnllSuQYMzy0T2Y4aMjyiU9WdxDMuS4-pbg/viewform 2/19
1/13/22, 10:57 AM End Semester Examination on 13/01/2022

4) Find the 2's complement of the 8 bit binary number 01010001 :

10101110

10101111

10010000

None of these

Clear selection

5) Convert binary number 1100101 to its equivalent decimal number:

101

011

110

111

Clear selection

https://docs.google.com/forms/d/e/1FAIpQLSfhj2SwyVnLU7QJnllSuQYMzy0T2Y4aMjyiU9WdxDMuS4-pbg/viewform 3/19
1/13/22, 10:57 AM End Semester Examination on 13/01/2022

6) What will be the output of given Python code?

Clear selection

7) What is the one’s complement of a number 1000110?

0111101

0111001

01100001

1001001

Clear selection

https://docs.google.com/forms/d/e/1FAIpQLSfhj2SwyVnLU7QJnllSuQYMzy0T2Y4aMjyiU9WdxDMuS4-pbg/viewform 4/19
1/13/22, 10:57 AM End Semester Examination on 13/01/2022

8)What will be the output of the following Python statement? >>>"Welcome to "+"
UEMK"

Welcome to UEMK

WelcometoUEMK

Welcome toUEMK

None of these

Clear selection

9)What will be the output of the following Python statement? >>>"PYTHON


PROGRAMMING" *3

PYTHON PROGRAMMINGPYTHON PROGRAMMINGPYTHON PROGRAMMING

PYTHON PROGRAMMING

PYTHON PROGRAMMINGPYTHON PROGRAMMING

NONE OF THESE

Clear selection

10) Which of the following statements create a dictionary?

d = {}

d = {“john”:40, “peter”:45}

d = {40:”john”, 45:”peter”}

All of the mentioned

Clear selection

https://docs.google.com/forms/d/e/1FAIpQLSfhj2SwyVnLU7QJnllSuQYMzy0T2Y4aMjyiU9WdxDMuS4-pbg/viewform 5/19
1/13/22, 10:57 AM End Semester Examination on 13/01/2022

11) What will be the output of the following Python code snippet? >>>d =
{"john":40, "peter":45} >>>print(list(d.keys()))

[“john”, “peter”]

[“john”:40, “peter”:45]

(“john”, “peter”)

(“john”:40, “peter”:45)

Clear selection

12) Let List1=[2,4,6,8,10], then print(List1[-2]) will result in _________

10

Clear selection

13) If List=[10,20,30,40,50] then after executing List[2]=35 the List will result as
____________

[35,10,20,30,40,50]

[10,20,30,40,50,35]

[10,20,35,40,50]

[10,35,30,40,50]

Clear selection

https://docs.google.com/forms/d/e/1FAIpQLSfhj2SwyVnLU7QJnllSuQYMzy0T2Y4aMjyiU9WdxDMuS4-pbg/viewform 6/19
1/13/22, 10:57 AM End Semester Examination on 13/01/2022

14) If List=[17,23,41,10] then List.append(32) will result into __________

[32,17,23,41,10]

[17,23,41,10,32]

[10,17,23,32,41]

[41,32,23,17,10]

Clear selection

15) Which of the following statement is not correct?

A list is mutable

A tuple is immutable.

The append() function is used to add an element.

The extend() function is used in tuple to add elements in a list.

Clear selection

16) Find the output?

LIFE

str1

STR1

None of these

Clear selection

https://docs.google.com/forms/d/e/1FAIpQLSfhj2SwyVnLU7QJnllSuQYMzy0T2Y4aMjyiU9WdxDMuS4-pbg/viewform 7/19
1/13/22, 10:57 AM End Semester Examination on 13/01/2022

17)Which of the following is False?

String is immutable.

capitalize() function in string is used to return a string by converting the whole given
string into uppercase.

lower() function in string is used to return a string by converting the whole given
string into lowercase.

None of these.

Clear selection

18) If str1="Stack of books" , What will be the output of the code print(len(str1))

13

15

14

16

Clear selection

19)What is the output of "Luck +1+6+9

Luck

15

Error

16

Clear selection

https://docs.google.com/forms/d/e/1FAIpQLSfhj2SwyVnLU7QJnllSuQYMzy0T2Y4aMjyiU9WdxDMuS4-pbg/viewform 8/19
1/13/22, 10:57 AM End Semester Examination on 13/01/2022

20)What is answer of this expression, 34 % 3 is?

Error

None of These

Clear selection

21)S = [1, 23, 'hello', 1], State the data type of this

list

dictionary

array

tuple

Clear selection

22)What is the output of this expression, 3*1**3?

27

Clear selection

https://docs.google.com/forms/d/e/1FAIpQLSfhj2SwyVnLU7QJnllSuQYMzy0T2Y4aMjyiU9WdxDMuS4-pbg/viewform 9/19
1/13/22, 10:57 AM End Semester Examination on 13/01/2022

23) Find the output of the code

abcd

aBCD

ABCD

abcD

Clear selection

24) Find the output of the expression round(4.5676,2)?

3.56

4.46

4.57

None of these

Clear selection

25)The output of the code: not(3<4)

False

True

Clear selection

https://docs.google.com/forms/d/e/1FAIpQLSfhj2SwyVnLU7QJnllSuQYMzy0T2Y4aMjyiU9WdxDMuS4-pbg/viewform 10/19
1/13/22, 10:57 AM End Semester Examination on 13/01/2022

26)Find the output : print(2**3 + (5 + 6)**(1 + 1))

129

11

Clear selection

27)Find the output >>>var = 10 >>>print(type(var)) >>>var = "Hello"


>>>print(type(var))

int , int

str, str

int, str

str, int

Clear selection

28)Find the output :: >>>str1 = 'Welcome'>>>print(str1*2)

WelcomeWelcome

Welcome Welcome

Error

Clear selection

https://docs.google.com/forms/d/e/1FAIpQLSfhj2SwyVnLU7QJnllSuQYMzy0T2Y4aMjyiU9WdxDMuS4-pbg/viewform 11/19
1/13/22, 10:57 AM End Semester Examination on 13/01/2022

29)Find the output >>>a = [1, 2, 3] >>>a = tuple(a) >>>a[0] = 2 >>>print(a)

[2,2,3]

(2,2,3)

(1,2,3)

Error

Clear selection

30)Which of the following concepts is not a part of Python?

Pointer

Loop

Dynamic typing

Above all

Clear selection

31) Which keyword is use for function? *

define

fun

def

function

https://docs.google.com/forms/d/e/1FAIpQLSfhj2SwyVnLU7QJnllSuQYMzy0T2Y4aMjyiU9WdxDMuS4-pbg/viewform 12/19
1/13/22, 10:57 AM End Semester Examination on 13/01/2022

32) Which of the following items are present in the function header? *

function name

parameter list

return value

Both function name and parameter list

33) If return statement is not used inside the function, the function will return: *

None

Null

Arbitrary value

34) What is a recursive function? *

A) A function that calls other function.

B) A function which calls itself.

C) Both A and B

D) None

35) Which of the following is the use of id() function in python? *

A. Id() returns the size of object.

B. Id() returns the identity of the object.

Both A and B

None

https://docs.google.com/forms/d/e/1FAIpQLSfhj2SwyVnLU7QJnllSuQYMzy0T2Y4aMjyiU9WdxDMuS4-pbg/viewform 13/19
1/13/22, 10:57 AM End Semester Examination on 13/01/2022

36) Which of the following function headers is correct? *

def fun(a = 2, b = 3, c)

def fun(a = 2, b, c = 3)

def fun(a, b = 2, c = 3)

def fun(a, b, c = 3, d)

37) In which part of memory does the system stores the parameter and local
variables of function call? *

heap

stack

Uninitialized data segment

None of the above

38) How is a function declared in Python? *

def function function_name():

declare function function_name():

def function_name():

declare function_name():

https://docs.google.com/forms/d/e/1FAIpQLSfhj2SwyVnLU7QJnllSuQYMzy0T2Y4aMjyiU9WdxDMuS4-pbg/viewform 14/19
1/13/22, 10:57 AM End Semester Examination on 13/01/2022

39) You can also create your own functions, these functions are called? *

built-in functions

user-defined functions

py function

None of the above

40) The code block within every function starts with a ? *

::

41) ___________ are the arguments passed to a function in correct positional


order. *

Required arguments

Keyword arguments

Default arguments

Variable-length arguments

https://docs.google.com/forms/d/e/1FAIpQLSfhj2SwyVnLU7QJnllSuQYMzy0T2Y4aMjyiU9WdxDMuS4-pbg/viewform 15/19
1/13/22, 10:57 AM End Semester Examination on 13/01/2022

42) Which of the following is the use of function in python? *

Functions are reusable pieces of programs

Functions don’t provide better modularity for your application

you can’t also create your own functions

All of the mentioned

43) What will be the output of the following Python code? *

4 is maximum

None of the mentioned

44) Which of the following is a feature of DocString? *

Provide a convenient way of associating documentation with Python modules,


functions, classes, and methods

All functions should have a docstring

Docstrings can be accessed by the __doc__ attribute on objects

All of the mentioned

https://docs.google.com/forms/d/e/1FAIpQLSfhj2SwyVnLU7QJnllSuQYMzy0T2Y4aMjyiU9WdxDMuS4-pbg/viewform 16/19
1/13/22, 10:57 AM End Semester Examination on 13/01/2022

45. Which of the following precedence order is correct in Python? *

Parentheses, Exponential, Multiplication, Division, Addition, Subtraction

Multiplication, Division, Addition, Subtraction, Parentheses, Exponential

Division, Multiplication, Addition, Subtraction, Parentheses, Exponential

Exponential, Parentheses, Multiplication, Division, Addition, Subtraction

46. Which of the following is not used as loop in Python? *

for loop

while loop

do-while loop

None of the above

47. Which of the following is not a standard data type in Python? *

Dictionary

Tuple

Structure

List

https://docs.google.com/forms/d/e/1FAIpQLSfhj2SwyVnLU7QJnllSuQYMzy0T2Y4aMjyiU9WdxDMuS4-pbg/viewform 17/19
1/13/22, 10:57 AM End Semester Examination on 13/01/2022

48. What do you use to define block of code in Python language? *

Key

Brackets

Indentation

Space

49. Which of the following Python statements will result in the output: 6? *

A[2][1]

A[1][2]

A[3][2]

A[2][3]

50. Which of the following is a Python tuple? *

{1, 2, 3}

{}

[1, 2, 3]

(1, 2, 3)

Submit Clear form

Never submit passwords through Google Forms.

This form was created inside of University of Engineering & Management, Jaipur. Report Abuse

https://docs.google.com/forms/d/e/1FAIpQLSfhj2SwyVnLU7QJnllSuQYMzy0T2Y4aMjyiU9WdxDMuS4-pbg/viewform 18/19
1/13/22, 10:57 AM End Semester Examination on 13/01/2022

 Forms

https://docs.google.com/forms/d/e/1FAIpQLSfhj2SwyVnLU7QJnllSuQYMzy0T2Y4aMjyiU9WdxDMuS4-pbg/viewform 19/19

You might also like