stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
Quiz Flashcards | StudBud
Explore
/
Quiz
Quiz
30 terms
·
StudBud Administration
·
60 plays
Python
Flashcards
30 cards
F
Practice quiz
P
Host live
L
Questions
30
Answers
1
Which one of the following is not a python's predefined data type?
Class
Tuple
String
List
2
Which one of these is floor division?
//
/
%%
%
3
Mathematical operations can be performed on a string
False
True
4
print("Hello {name1} and {name2}".format(name1='Hi', name2='Hello'))
Hello Hi and Hello
Hello Hi Hello
Hello
Hi Hi
5
What is the return type of function id?
int
float
string
string
6
What do we use to define a block of code in Python language?
Indentation
Colon :
Key
Brackets
7
Set datatype will not duplicate value
True
False
8
What is the value of the expression 1 + 2 ** 3 * 4?
4097
36
33
108
9
How to get input for variables from user
raw()
input()
raw_put()
raw_in()
10
What will be the output of the following Python code? d = {"john":40, "peter":45} d["john"]
45
42
John
40
11
Which of the following data type is used to store values in Key & Value format?
Dictionary
List
Tuple
Class
12
print('welcome' , 'All' ,sep='#')
WelcomeAll
Welcome All
Welcome#All
Welcome
13
What is the associativity of Operators with the same precedence?
Depends on operator
Left to Right
Depends on python complier
Right to left
14
Who developed the Python language?
Guido van Rossum
Niene Stom
Zim Den
Wick van Rossum
15
Is Python case sensitive?
True
False
16
x={"python","java","c language","php","vb"}print("c++" in x)
True
False
17
What is the output of the following code?print(sep='#' ,Abdul' ,20 ,'California')
Abdul' ,20 ,'California
Abdul#20#California#
Abdul' ,20 ,'California
Error
18
what is the output for: name="Hello World"print(type(name))
<class 'str'>
< class 'int'>
<class ' char'>
<class 'list'>
19
x,y,z=15,20,10print(x is y)
False
True
20
In Python, a variable must be declared before it is assigned a value:
True
False
21
What Python built-in function returns the unique number assigned to an object
id()
ref()
Identity ()
refnum()
22
What data type is the object below ? L = [1, 23, ‘hello’, 1]
String
Dictionary
List
Tuple
23
How will you find the type of value stored in a variable
typeget()
type()
typei()
typedef()
24
Which of the following operators has the lowest precedence?
**
%
and
+
25
Is Tuple is mutuable?
True
False
26
What is the output?a = 8.6b = 2print a//b
4.3
4.0
4
4.1
27
What is the value of this expression?2**2**3**1
64
12
656
256
28
What is the value of the expression 100 / 25?
4.00
4.000
4
4.0
29
In the Python statement x = a + 5 - b
operands, an equation
operands, an expression
operators, a statement
terms, a group
30
For two objects x and y:x is y is Trueif and only ifid(x) == id(y)
True
False