1 mark Questions BASICS OF PYTHON
1 Who developed Python Programming Language?
e) Wick Van Rossum
f) Rasmus Lerdorf
g) Guido Van Rossum
h) Niene Stom
2 In Python, which of the following characters is used to create single
line comment
e) //
f) #
g) !
h) /*
3 An identifier cannot start with a ________
e) Number
f) Character
g) Underscore
h) None of the above
4 ______________ has a specific meaning in python program
e) Constant
f) Variable
g) Keyword
h) Identifier
5 Write the output of the following python statement
print(10//3)
e) 3
f) 3.33
g) 1
h) 0
6 Which of the following is the valid Python file extension?
e) . python
f) . pl
g) . py
7 Numbers with fractions or decimal points are called ________
datatype.
e) Integer
f) String
g) Float
h) None of the above
8 _______is an ordered sequence of letters/characters. They are enclosed
in
single quotes (‘ ’ ) or double (“ ”).
e) String
f) Integer
g) Float
h) None of the above
9 ___________ are a sequence of values of any type, and are indexed by
integers.
They are immutable and enclosed in ().
e) String
f) Lists
g) Tuples
h) All of the above
10 _________ function is used to display given output in python.
e) printf()
f) print()
g) scan()
h) None of the above
11 _________ function is used to take input from the user in python.
e) input()
f) insert()
g) store()
h) None of the above
12 The data type of 14.5 is __________
e) int
f) float
g) string
h) list
13 ___________ operator gives the remainder in Python.
e) %
f) /
g) //
h) *
14 __________ operator is used to find the square of a number
e) ^
f) *
g) **
h) //
15 What does the following code print?
if 4 + 5 == 10:
print("TRUE")
else:
print("FALSE")
e) TRUE
f) FALSE
g) None of them
h) TRUE FALSE
16 What will be the datatype of following variable ?
A= “100”
e) int
f) float
g) string
h) list
17 Smallest element of python coding is called ______
e) Identifiers
f) Tokens
g) Keywords
h) Delimiters
18 Find the invalid variable among the following:
e) 1st_place
f) my_place
g) _first
h) Fun
19 T=[10,20,30,40] is a type of which datatype in python
e) int
f) string
g) list
h) tuple
20 The _________ mode of python
gives instant result of typed
statement
e) Interactive mode
f) Script mode
g) Combination of
interactive and script mode
h) All of these