Problem Solving And Python Programming Set 2
On This Page
This set of Problem Solving and Python Programming Multiple Choice Questions & Answers (MCQs) focuses on Problem Solving And Python Programming Set 2
Q1 | What type of structure is this?
- sequence
- case
- repetition
- process
Q2 | What type of a structure is this?
- sequence
- case
- repetition
- process
Q3 | A is a connector showing the relationship between the representative shapes.
- line
- arrow
- process
- box
Q4 | The following box denotes?
- decision
- input/output
- process
- module
Q5 | Capitalize initial keyword – This is a rule while writing a pseudo code.
- true
- false
Q6 | is used to show hierarchy in a pseudo code.
- indentation
- curly braces
- round brackets
- semicolon
Q7 | The statement that tells the computer to get a value from an input device and store it in a memory location.
- read
- write
- read
- write
Q8 | are identified by their addresses, we give them names (field names / variable names) using words.
- memory variables
- memory locations
- memory addresses
- data variables
Q9 | begins with lower case letters.
- keywords
- variables
- tokens
- functions
Q10 | Another notation for exponentiation.
- *
- ** c) ***
- d) *^
Q11 | A symbol used for grouping.
- ()
- {} c) [].
- d) ” ”
Q12 | A statement used to close the IF block.
- else
- elseif
- end
- endif
Q13 | Is Python case sensitive when dealing with identifiers?
- yes
- no
- machine dependent
- none of the mentioned
Q14 | What is the maximum possible length of an identifier?
- 31 characters
- 63 characters
- 79 characters
- none of the mentioned
Q15 | Which of the following is invalid?
- _a = 1
- a = 1
- str = 1
- none of the mentioned
Q16 | Which of the following is an invalid variable?
- my_string_1
- 1st_string
- foo
- _
Q17 | Why are local variable names beginning with an underscore discouraged?
- they are used to indicate a private variables of a class
- they confuse the interpreter
- they are used to indicate global variables
- they slow down execution
Q18 | Which of the following is not a keyword?
- eval
- assert
- nonlocal
- pass
Q19 | All keywords in Python are in
- lower case
- upper case
- capitalized
- none of the mentioned
Q20 | Which of the following is an invalid statement?
- abc = 1,000,000
- a b c = 1000 2000 3000
- a,b,c = 1000, 2000, 3000
- a_b_c = 1,000,000
Q21 | Which of the following cannot be a variable?
- init
- in
- it
- on
Q22 | Which is the correct operator for power(xy)?
- x^y
- x**y
- x^^y
- none of the mentioned
Q23 | Which one of these is floor division?
- /
- //
- %
- none of the mentioned
Q24 | What is the answer to this expression, 22 % 3 is?
- 7
- 1
- 5
Q25 | Mathematical operations can be performed on a string.
- true
- false