Saturday, April 21, 2018

Python Programming MCQ


1. Which of the following is correct about Python?
A - Python is a high-level, interpreted, interactive and object-oriented scripting language.
B - Python is designed to be highly readable.
C - It uses English keywords frequently where as other languages use punctuation, and it has fewer syntactical constructions than other languages.
D - All of the above.

2. Which of the following operator in python performs exponential power calculation on operands?
A - **
B - //
C - is
D - not in

3. Which of the following operator in python evaluates to true if it does not finds a variable in the specified sequence and false otherwise?
A - **
B - //
C - is
D - not in

4. Which of the following function converts a string to all uppercase?
A – upper
B - isdecimal
C - swapcase
D – title

5. Which of the following is correct about Python?
A - It supports automatic garbage collection.
B - It can be easily integrated with C, C++, COM, ActiveX, CORBA, and Java.
C - Both of the above.
D - None of the above.
6. Which of the following statement terminates the loop statement and transfers execution to the statement immediately following the loop?
A - break
B - continue
C - pass
D - None of the above.

7. What is the output of len[1, 2, 3]?
A - 1
B - 2
C - 3
D – 4

8. Which of the following function checks in a string that all characters are in lowercase?
A - islower
B - isnumeric
C - isspace
D – istitle

9. Which of the following environment variable for Python tells the Python interpreter where to locate the module files imported into a program?
A - PYTHONPATH
B - PYTHONSTARTUP
C - PYTHONCASEOK
D – PYTHONHOME

10. Which of the following data types is not supported in python?
A - Tuple
B - Dictionary
C - Generics
D - List

Microprocessor and interfacing MCQ


1. The size of 8086 16 bit is decided by
a.  Control Bus                                                   b. Data Bus                 
c. Address Bus                                                   d. Flag register

2. The size of address bus of 8086 is
a. 16 bit                                                               b. 32 bit             
c. 20 bit                                                               d. 64 bit

3. Which one is/are control flag in flag register?
a. Trap       flag                                                   b. Interrupt flag         
c. Direction Flag                                                d. All of these

4. How many pins are there in 8086 microprocessor?
a. 24                              b. 28                              c. 40                              d. 16

5. How many pins are there in 8251 USART chip?
a. 24                              b. 28                              c. 40                              d. 16

6. How many pins are there in 8253 PIT chip?
a. 24                              b. 28                              c. 40                              d. 16

7. How many pins are there in 8255 PPI chip?
a. 24                              b. 28                              c. 40                              d. 16

8. How many pins are there in 8237 DMA chip?
a. 24                              b. 28                              c. 40                              d. 16

9. How many pins are there in 8259 PIC chip?
a. 24                              b. 28                              c. 40                              d. 16

10. How many pins are there in 8279 KDC chip?
a. 24                              b. 28                              c. 40                              d. 16

Discrete Mathematical Structure MCQ

1. Which one is not set operation?
a. Set difference                   b. Union                     c. Intersection                      d. Proper subset

2. Which is the intersection of set A={a,e,i,o,u} and B={a,b,c,d,e}?
a. {a,e}                                    b. {a}                          c. {b}                                      d. {c}

3. What is the formula for Power set (A), if A has n number of elements?
a. 2n                                       b. 2n                            c. 2n-1                                    d. 2n-1

4. Which is not the property of Binary relation?
a. Reflexive                           b. Symmetric            c. Identity                             d. Transitive

5. How many words can be formed for the word “DISCRETE”?
a. 20160                                 b. 40320                     c. 5040                                   d. None

6. If n is number of holes and m is number of pigeon, then which condition has to be followed by Pigeon-hole principle?
a. n>m                                    b. n                        c. n=m                                    d. n=

7. DeMorgan Law is
a. (a’+b’)=(ab)’                     b. (a’b’)=(a+b)’         c. both                                    d. none

8. Which symbol is known as Universal Quantifier?
a. ∀                                         b. ∃                             c. ∆                                          d. ∁

9. Which symbol is known as existential quantifier?
a. ∀                                         b. ∃                             c. ∆                                          d. ∁

10. P->Q is equivalent to
a. ~PQ                                 b. ~P⋀Q                     c. P⋁~Q                                 d. P⋀~Q

Digital Electronics MCQ


1. Which one is unary gate?
a. NOR                                    b. XNOR                                 c. NOT                                    d. XOR

2. Which binary number is same as 2’s complement of itself?
a. 1001                                   b. 0110                                   c. 1010                                   d. 1000

3. Which is/are used to reduce the Boolean expression?
a. Karnaugh map                                                                  b. Boolean algebra laws
c. Boolean properties                                                          d. All of these

4. What is the Boolean expression of given logic diagram?
a. AB
Image result for digital logic circuit
b. A’B’ + AB
c. (AB)’
d. All of these
5. Race around condition is associated with
a. RS flip flop                        b. JK flip flop                         c. MS flip flop                        d. none of these

6. If X is any input of flip flop, then the expression QX is of___________________________ flip flop.
a. Toggle Flip Flop               b. Delay Flip Flop                 c. MS Flip Flop                      d. RS Flip flop

7. How many flip flops are needed to design MOD-27 counter?
a. 5                                          b. 6                                          c. 4                                          d. 3

8. What is/are the difference between Sequential circuit and combinational circuit?
a. Feedback in sequential circuit                                     
b. Only Universal gates are used to design sequential circuit
c. Sequential circuits are used to design memory.
d. All of the above

9. How many RAM chips are needed to design the main memory capacity of 2MB, where one RAM chip is of the size 512 bytes?
a. 12                                        b. 16                                       c. 9                                          d. 11

10. Determine the effective access time, if the cache access time is 10ns and main memory access time is 110ns?
a. 19ns                                   b. 20ns                                   c. 18ns                                   d. 21ns

Search Aptipedia