You are on page 1of 8

Q.

33The break statement terminates the execution of the whole loop.


Q.34 Function range(10, 5, 2) will yield an iterable sequence like
1. [] 2. [10, 8, 6] 3.[2, 5, 8] 4.[8, 5, 2]
Q.35 The operator used to check if both the operands reference the same object memory, is the ..........
operator.
1. In 2.is 3. Id 4.==
Q.35 Which of the following sequences would be generated bt the given line of code?
range (5, 0, -2)
A. 5 4 3 2 1 0 -1 B. 5 4 3 2 1 0 C. 5 3 1 D. None of the above

Q.36 When does the else statement written after loop executes?
A. When break statement is executed in the loop
B. When loop condition becomes false
C. Else statement is always executed
D. None of the above

Q.37 Which of the following are valid identifiers ?


1. my name 2. _myname 3. myname 4.my-name
Q.38 Escape sequences are treated as .......... .
1. strings 2. characters 3. integers 4.none of these
Q.39 What is the output of the following?

i=2
while True:
    if i%3 == 0:
        break
    print(i)
    i += 2
A. 2 4 6 8 10 … B. 2 4 C. 2 3 D. error
Q.1 (1B0.B0)16 The octal equivalent of the decimal number (417)10 is
Ans. (614)8
Q.2 Convert the hexadecimal number (1E2)16 to decimal.
Ans. (482)10
Q.3 Convert binary to octal: (110110001010)2 =?
Ans. (6612)2
Q.4 Add the binary numbers : 110101 and 101111 = 1100100
Q.5 Convert (FACE)16 to binary.
Ans. 110100100110
Q.6 1100001110 Convert the following (2C9)16 to decimal.
Q7. Convert these numbers to octal system number
 (11100.1001)2
 (111111)2 = (77)8
Q.8 Convert these numbers to binary system number
 (5A.B)16 = 01011010.1011
 (75.2)8= 111101.010
Q.9 Convert Decimal to Binary: (782)10
Q.10 Convert the following decimal numbers to equivalent octal numbers.
(a) (19)10 = 23 (b) (132)10=204
Q.11 Convert the following binary numbers to equivalent hexadecimal numbers.
(a) (10 1010)2 =2A (b) (1 1110 0110)2=1E6
Best of Luck... 1/8
Q12. Obtain the Boolean Expression for the logic circuit shown below:

Ans. Q= AB+BC(B+C)
Q.1 Q13 Principal of dual for the Boolean expression AB.(1+CD) is
1. AB+(1.CD)
2. (A+B)+(0.C+D)
3. (A+B).(0.C+D)
4. (A+B)+(1.C+D)

Q.2 Principal of dual for the Boolean expression (A+B).(0+(D+E+F)) is


1. AB+(1.DEF)
2. AB.(1.DEF)
3. AB.(1+DEF)
4. AB+(0+DEF)

Q.3 Principal of dual for the Boolean expression 1+0=X is


1. 0+1=X
2. 1.0=X
3. 1+0=X
4. 0.1=X

Q.4 Principal of dual for the Boolean expression A+1=1 is


1. A+0=0
2. A.0=1
3. A.0=0
4. A+0=0
Q.5 Obtain the Boolean Expression for the logic circuit shown below:

1. P = A+B.C
2. P = AB+C
3. P = A+B+C
4. P = ABC

Q.6 Obtain the Boolean Expression for the logic circuit shown below:

Best of Luck... 2/8


1. F = AB+CD
2. F = (A+B)(C+D)
3. F= AB+C+D
4. F = ABCD

Q.7 Obtain the Boolean Expression for the logic circuit shown below:

1. Y = A + A’B
2. Y = A + AB
3. Y = A’ + AB
4. Y = A’(A+B)

What is the dual of : A+(BC)+(0(D+1))


Q.1 1. A.(B.C).(1(D.1))
2. A.(B+C).(1+(D.0))
3. A.(B+C)+(1+(D.0))
4. A.(B+C).(1(D.0))

Q.2 The output of a two-input OR gate is high when


1. both inputs are low
2. both inputs are high
3. any one input is high
4. only one input is high

Q.3 The output of a two-input AND gate is high when


1. both inputs are low
2. both inputs are high
3. any one input is high
4. only one input is high

Q.4 Which gate produces output 1 when inputs are 1 and 1 ?


1. AND
2. OR
Best of Luck... 3/8
3. NOT
4. Both A and B

Q.5 Which gate produces output 1 when inputs are 1,0,1 ?


1. OR
2. AND
3. NOT
4. None of these

Q.6 Which gate produces output 0 when inputs are 1,1,0,1 ?


1. OR
2. AND
3. NOT
4. None of these

1. Which two operators can be used on numeric values in Python?


A. @
B. %
C. +
D. #
a) B, D b) B, C
c) A, C d) A, D
2. Which line of code produces an error?
a) '1' + 2 b) "one" + "2"
c) "one" + 'two' d) 1 + 2
3. Identify the valid declaration of L:
L = ['Mon', '23', 'hello', '60.5']
a) list b) string
c) tuple d) dictionary
4. What is the value of this expression,
3**1**3?
a) 9 b) 27
c) 1 d) 3

Best of Luck... 4/8


5. Which is the correct form of declaration of dictionary?

a) Day = {1'monday', b) Day = {1:'Monday',


2'tuesday', 3'wednesday'} 2:'Tuesday',
c) Day = {1:'Monday'; 3:'wednesday'}
2:'Tuesday'; d) Day = {1;'Monday',
3:'wednesday'} 2;'Tuesday',
3;'wednesday'}
6. The keys of a dictionary must be of types.

a) mutable b) immutable
c) integer d) all of these

7. What data type is the object below? L= [1, 23, 'hello', 1]

a) dictionary b) array
c) tuple d) list

Q.26 what will be the result of the expression ‘a’ and ‘x’ ? Ans. X
Q.27 what will be the result of the expression ‘False’ and False? Ans. False
Q.28 What keyword would you use to add an alternative condition to an if statement?
a. else if b. elseif c. elif 
d. None of the above

Q.29 Consider the loop given below :

for i in range(10, 5, -3) :


print(i)
How many times will this loop run?

Best of Luck... 5/8


1. 3 2. 2 3. 1 4. Infinite
2.

Best of Luck... 6/8


Best of Luck... 8/8

You might also like