55+ Introduction to Python [MCQs] | Python MCQs

If you are searching for Introduction to Python Mcqs, Than here we are with 40 best mcqs on introduction to python , which could be used for problem solving and programming purpose

MCQs are based on:

Problem solving in everyday life, types of problems, problem solving with computers, difficulties with problem solving, problem solving aspects, top down design. Problem Solving Strategies, Program Design Tools: Algorithms, Flowcharts and Pseudo-codes, implementation of algorithms. Basics of Python Programming: Features of Python, History and Future of Python, Writing and executing Python program, Literal constants, variables and identifiers, Data Types, Input operation, Comments, Reserved words, Indentation, Operators and expressions, Expressions in Python.

55+ MCQs on Introduction to Python | Python MCQs

1. What is the maximum possible length of an identifier?
A. 32
B. 8
C. 16
D. None of these
Answer: None of these
2. Who developed the Python language?
A. Guido van Rossum
B. Niene Stom
C. Zim Den
D. Wick van Rossum
Answer: Guido van Rossum
3. In which year Python language developed? 1
A.1980
B.1995
C.1981
D.1989
Answer: 1980
4. In which language Python is written?
A. PHP
B. English
C. C
D. All of the above
Answer: C
5. Which one of the following is the correct extension of the Python file?
A. py
B. .python
C. .p
D. None of these thesex
Answer: .py
6. In which year was the Python 3.0 version developed?
A. 2001
B. 2008
C. 2010
D. 2005
Answer: 2008
7. What do we use to define a block of code in Python language?
A. Brackets
B. Key
C. Indentation
D. None of these
Answer: Indentation
8. Which character is used in Python to make a single line comment?
A. //
B. /
C. #
D. !
Answer: #
9. Top down design strategy is also known as
A. stepwise refinement
B. output module
C. input module
D. none of above
Answer: stepwise refinement
10. In Python String is collection
A. character
B. numbers
C. operators
D. none of above
Answer: character
11.Types of expressions are
A. infix expression
B. outfix expression
C. postfix expression
D. a and c
Answer: infix expression
12. Which of the following operators is the correct option for power(ab)?
A. a**b
B. a^b
C. a ^ ^ b
D. a ^ * b
Answer: a**b
13. Which of the following declarations is incorrect?
A. x = 3
B. _x = 2
C. __xyz = 5
D. None of these
Answer: None of these
14. Which of the following is not a keyword in Python language?
A. raise
B. val
C. try
D. with
Answer: val
15. A design is an intermediate sep between
A. analysis and coding
B. coding and testing
C. testing and maintenance
D. none of above
Answer: analysis and coding
16. The sequence of solutions to the problems is
A. logical
B. not logical
C. a and b
D. none of these
Answer: logical
17. One of the most difficult task for the problem solver is
A. writing the instructions
B. reading the instruction
C. solving the instruction
D. None of these
Answer: writing the instructions
18. Each algorithm is supplied with
A. zero of one input
B. two input
C. three input
D. four input
Answer: zero of one input
19. Flowcharts are the ——— representation of algorithms.
A. graphical
B. non graphical
C. a and b
D. none of these
Answer: graphical
20. The parallelogram indicates
A. input and output
B. only input
C. only output
D. b and c
Answer: input and output
21. The diamond indicates the decision and it has
A. one entrance and two exits
B. two entrance
C. three exits
D. a and b
Answer: one entrance and two exits
22. The process module has
A. one entrance and one exit
B. one entrance and two exits
C. no exits
D. b and c
Answer: one entrance and one exit
23. The off page connector connects the
A. two different section on different pages
B. three sections
C. four sections
D. infinite section
Answer: two different section on different pages
24. The on page connector connects the
A. two different section on the same page
B. on different page
C. multiple pages
D. a and b
Answer: two different section on the same page
25. For large and complex programs,designing of flowchart becomes
A. complicated
B. easy
C. heuristic
D. all the above
Answer: Easy
26. For large and complex programs,designing of Algorithm becomes
A. complicated
B. easy
C. heuristic
D. all the above
Answer: complecated
27. Programming languages are
A. formal language
B. informal language
C. a and b
D. none of these
Answer: formal language
28. Examples of imperative programming are
A. C
B. Ada, Fortran
C. Pascal
D. all above
Answer: C
29. The imperative programming is also called as
A. procedural programming
B. non procedural
C. sequential programming
D. a and c
Answer: procedural programming
30. In object oriented programming language everything is modelled as
A. object
B. class
C. entity
D. a and b
Answer: object
31. Examples of OOP are
A. smalltalk
B. C++
C. java, python
D. all the above
Answer: all of above
32. A problem is a _____of difficulty
A. state
B. alternatives
C. nature
D. none of these
Answer: state
33. For solving some problem which actions are taken
A. predicted actions
B. series of actions
C. popular actions
D. a and b
Answer: series of actions
34. The solution that can not be reached through direct set of steps are called
A. indirect solution
B. direct solution
C. heuristic solution
D. a and c
Answer: heuristic solution
35. Coding is a step in which design is translated into______
A. non-readable form
B. machine readable form
C. static form
D. dynamic form
Answer: machine readable form
36. Testing begins when____is done
A. coding
B. designing
C. maintenance
D. b and c
Answer: coding
37. Each algorithm must produce
A. at least two output
B. at least one output
C. at least three output
D. at least four output
Answer: at least one output
38. The imperative programming is also called as
A. procedural programming
B. non procedural programming
C. iterative programming
D. a and b
Answer: procedural programming
39. data and methods are bound in one entity called
A. object
B. class
C. inheritance
D. interface
Answer: object
40. The logic paradigm focuses on
A. non predicate logic
B. alternative logic
C. predicate logic
D. a and b
Answer: predicate logic
41. __is another field in which python has a brighter scope in the future
A. networking
B. programming
C. designing
D. none of these
Answer: networking
42. A constant is a type of variable whose value
A. can be changed
B. cannot be changed
C. a and b
D. none of these
Answer: cannot be changed
43. Boolean literal has two values
A. left and right
B. up and down
C. true and false
D. none of these
Answer: true and false
44. Leading white space at the beginning of logical line is called
A. indentation
B. intention
C. carrying
D. forwarding
Answer: indentation
45. Each algorithm should have
A. finiteness
B. infiniteness
C. null
D. a and b
Answer: finiteness
46. What is the output of this code?
>> int(“30” + “40”)
A. “70”
B. “3040”
C. 3040
D. (“30” + “40”)
Answer: 3040
47. A variable can be removed using which keyword
A. remove
B. clear
C. del
D. delete
Answer: del
48. The input() function takes user’s input as a
A. can be changed
B. cannot be changed
C. a and b
D. none of these
Answer: cannot be changed
49. The input() function takes user’s input as a
A. integer
B. float
C. string
D. character
Answer: string
50. Which operator treats opearand as a sequence of bits?
A. Relational
B. Arithmetic
C. Bitwise
D. Logical
Answer: Bitwise
51.Which operator is also known as string repetition operator?
A. +
B. *
C. &
D. ^
Answer: *
52. If, x=5; y=_; and print(x+y) gives 12, then y is
A. 7
B. =
C. 7
D. “7”
Answer: 7
53. Which of the following results in True?
A. >>>9=9 and 1==1
B. >>>3==5 and 7==3
C. >>>7!=1 and 5==5
D. >>4<1 or 1>6 A
Answer: >>>9=9 and 1==1
54. What is the output of the following code?
x = 6
y = 2
print(x ** y)
print(x // y)
A. 66
0
B. 36
0
C. 66
3
D. 36
3
Answer: 36
3
55. What is the output of the following code
x = 100
y = 50
print(x and y)
A. TRUE
B. 100
C. FALSE
D. 50
Answer: 50
56. Identify the expression that may result in arithmetic overflow.
A. a*b
B. a**b
C. a/b
D. a+b
Answer: a**b
57. Pseudo code is also known as
A. Program Design Language
B. Hardware Language
C. Software Language
D. Algorithm
Answer: Program Design Language
58. Which operator gives remainder after division?
A. /
B. //
C. %
D. *
Answer: %