CBSE COMPUTER SCIENCE
前往频道在 Telegram
QUESTION BANK, REFERENCE BOOK, LAB MANUAL , WORKSHEET ETC., PYTHON TEXT BOOK AND REFERENCE BOOKS, 01. ASK QUESTIONS AT https://t.me/joinchat/FJ1noGs-64I0OWI1
显示更多549
订阅者
无数据24 小时
无数据7 天
无数据30 天
帖子存档
def calculate():
L[0]=5
print(L)
L=[]
N=int(input('Enter number of elements :'))
I=0
while(I
a=10
def fun3():
global a
print('In fun')
print('a=',a)
a=a+3
print('a=',a)
a=5
print('a=',a)
fun3()
print('Back')
print('a=',a)
1.Name the Python Library modules which need to be imported to invoke the following functions a) pow() b) mean()
1.Name the Python Library modules which need to be imported to invoke the following functions a) pow() b) mean()
(1 Point)
Package
Python Path
Site-packages
Python-Modules
20.Which operator is used in python to import all modues from packages?
(1 Point)
%
$
#
*
21.What is the extension of python library modules?
(1 Point)
.lib
.mod
.py
.txt
22.Which file must be part of the folder containing Python module files to make it importable python package?
(1 Point)
init__.py
init.py
_init_.py
__init.py
23.A Python _____ can contain objects like docstrings, variables, functions, constant, classes, objects and statements
(1 Point)
Library
Package
Function
Classes
24.the ________ are useful for documentation purposes
(1 Point)
docstrings
comments
statements
help()
25.The _______ is a repository of software for the python programming language, it helps to find and install software developed and shared by the python communitiy.
(1 Point)
Python Package Index (PyPI)
Python Package List
Python Package Storage
Python Library Index
26.The uniform() function is belongs to _____module
(1 Point)
math
statistic
random
os
27.The capwords() function is the part of the ____ module
(1 Point)
Lib
String
Math
Random
28.An independent triple quoted string given inside a module, containing documentation related information is a _______
(1 Point)
Documentation
Docstring
DString
StringDoc
29.Which of the following random module functions generates a floating poing number?
(1 Point)
random()
randomfloat()
randomint()
randfloat()
30.The _____ library provide URL handling functions so that we can access websites
(1 Point)
Urlweb
Urllib
WebUrl
LibUrl
COMPUTER SCIENCE WITH PYTHON (083)
GRADE : 12
CHAPTER : PYTHON LIBRARIES
1.Name the Python Library modules which need to be imported to invoke the following functions a) pow() b) mean()
math and statistics
statististics and random
random and math
os and math
2.Name the modules to which the following func-tions belong: a) Uniform () b) fabs ()
(1 Point)
random and os
random and math
math and statistics
datetime and math
3.To convert a fractional number into whole as the nearest next ______ and convert to the nearest lower whole number ________
(1 Point)
floor() and ceil()
round() and ceil()
round() and floor()
floor() and round()
4.Out of the following, find those identifiers, which cannot be used for naming Variables or functions in a Python program: Total * Tax, While, class, Switch, 3rd Row, finally, Column31, Total.
(1 Point)
While, Swich, finally, Column31
Total * Tax, class, 3rd Row, finally
Column31,While, Total, Total * Tax
While, 3rd Row, Total, Switch
5.Name the Python Library modules which need to be imported to invoke the follwing functions : a) sqrt() b) fabs()
(1 Point)
math and random
math and math
math and random
math and statistics
6.Out of the following, find the identifiers, which cannot be used for naming Variable or Functions in a Python program: _Cost, Price*Qty, float, switch, Address one, Delete, Number12, for
(1 Point)
_Cost, Price * Qty, switch , Delete
Price * Qty, Number12, Address one
Price *Qty, float, Address one, for
_Cost, switch, Delete , Number12
7.Out of the following find those identifiers, which can not be used for naming Variable or Functions in a Python Program: Days * Rent, for, A_price, Grand Total, do, 2Clients, Participant, My_city
(1 Point)
A_Price, do, Participant and My_City
Days * Rent, Grand Total, do and Participant
A_Price, do, 2Clients and My_City
Days * Rent, do, 2Clients, for and Grant Total
8.How can we import math module in Python?
(1 Point)
Imports math()
import math()
import math
import math*
9.How can we import a module in Python using "from"
(1 Point)
from import
from import
import from
import from
10.Values provided in function call _______ and Values provided in function header _________
(1 Point)
Values and Arguments
Parameter and Arguments
Arguments and Parameters
Parameters and Values
11.Python allows function arguments to have default values; if the function is called without the argument, the argument gets its ____________
(1 Point)
Default value
Actual Value
Formal Value
User Defined Value
12.If there is a function with many parameters and we want to specify only some of them in function call, then value for such parameters can be provided by using their names instead of the positions is known as _______
(1 Point)
Default Arguments
Keyword Arguments
Positional Arguments
User-Defined Arguments
13.Correct the statment a) r = raw-input(‘enter any radius : ’) b) Print(Values of r is ' r)
(1 Point)
r=raw_input("enter any radius : ") and print('Value of r is' r)
r=raw_input("enter any radius : ") and print('Value of r is',r)
r=raw-input("enter any radius : ") and print('Value of r is' r)
r=raw-input("enter any radius : ") and print('Value of r is', r)
14.Import all objects from a module as
(1 Point)
import all
import *
import *
from import *
15.the divmod(7,2) function of math module return
(1 Point)
{3,1}
(1,3)
[3,1]
(3,1)
16.Collection of modules in a single unit is known as _______
(1 Point)
User-defined modules
Package
Built-in Modules
Functions
17.A ________ can have one or more packages and subpackages
(1 Point)
Module
Package
Library
Function
18.A ________ is collection of python modules under a common namespace, created by placing different modules on a single directory along with __init__.py
(1 Point)
Library
Module
Package
Objects
19.The _____ is the target directory in which all installed Python packages are placed by default
