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

Search Aptipedia