Zed-King Institute
    All Notes

    O Level · Chapterwise MCQ

    Chapter 4: Operators, Expressions and Python Statements — MCQ

    Zed-King Study app · Free

    O Level students across India practise here, free

    Daily M1–M4 quizFull 100-question mocksAll-India rank
    Open the free app

    Google login · no Play Store needed

    🏆 Free All-India Sunday Mock · Sun, 29 Nov, 11 AM · CCC + O LevelRegister

    About this PDF

    Chapter 4 — questions on arithmetic, comparison, logical and assignment operators, expressions and control statements.

    This is part of the free O Level M3-R5.1 study material in the Zed-King Study Zone. You can read every page above in your browser, or download the file and study offline. Zed-King Group of Institute is a NIELIT Study Centre in Kaithal, Haryana, and all of this material follows the current NIELIT syllabus.

    Course
    O Level — NIELIT Foundation Diploma
    Module
    M3 — M3-R5.1: Programming and Problem Solving through Python
    Section
    Chapterwise MCQ
    Format
    PDF — read online or download
    Price
    Free, no sign-up required

    Text from this PDF

    The opening pages as plain text — open the reader above for tables, diagrams and the full file.

    https://www.youtube.com/@zedkinggroupofinstitutions1663 @zedkinginstitute

    Chapter-4(Operators,Expressions And Python Statement)

    Q1. Which operator is used for concatenate two strings. · Ans. +

    Q2. Which operator returns he quotient after division. · Ans. //

    Q3.which operator is used to calculate remainder after division. · Ans. %

    Q4. Which operator repeats a list for the given number of items. · Ans. *

    Q5. ____is the name of the operator ** in python. · Ans. Exponentiation

    Q6. Conditional statement are also known as _______ · Ans. Decision–making

    Q7 The condition in the f statement should be in the form of______ · Ans. Relational or logical operator

    Q8. Which keyword would you use to add an alternative condition to an if statement. · Ans. elif

    Q9. A sentinel-controlled loop can be implemented using ____ · Ans. for

    Q10. ______ generaters a list of numbers, to iterate over with for loops. · Ans. Range()

    Q11. _______function returned an iterator a sequence object. · Ans.

    Q12. Which statement lets the program go through the piece of code without performing any action. · Ans. pass

    Q13. ______ Occurs when you execute the following python code snippet. · Ans. Nameerror

    Q14. The _______ statement is used for exiting from the loop. · Ans. break

    Q15. Which statement is used to jumps back to the top of the loop for the next iteration. · Ans. continue

    Q16. Which loop is not supported in python. · Ans. do-while

    Q17. ______ continues repeating without a terminating condition. · Ans. Infinite loop

    Q18.______zip() functions takes iterables (can be zero or more),makes iterator that aggregates elements based on the iterables passed, and retuns an iterator of tuples. · Ans. zip()

    >>>print(x<<2)

    Ans. 16

    Q20. for i in range(65,70):

    print(chr(i))

    Ans. ABCDE

    Q21. ____will be the output of the following code.

    n=5 while n>0:

    if n==2:

    continue print(n)

    Ans. 4310

    Q22. What is th e purpose of the elif keyword in Python? · Ans. To execute a block of code if the preceding if statement is false and the condition of elif is true

    Q23._____will be the output the output of the following code.

    M=*‘b’ *x for x in range(4)+ print(M)

    Ans.*“,”,”b”,”bb”,”bbb”+

    Q24._____will be the output the output of the following code.

    y=’klmn’ for I in range(len(y)):

    print(y)

    Q25. Operators with the same precedence are evaluated in which manner? · Ans. Left to Right

    Q26.Which of the following expression is correct. · c) 21%4=1 d) all of the above

    Q27. What are the value of the following python expressions?

    Q28. Which of the following expression value is correct. · c) (2**2)**2=16 d) all of the above

    Q29. What will be the output of the following Python list comprehension?

    Print([j for I in range(2,8)

    for j in range (i*2,50,i)])

    a) A list of prime numbers up to 50

    b) A list of non prime numbers, up to 50

    c) A list of numbers divisible by 2, up to

    d) Error

    Q30. Amongst which of the following is/are the conditional statement in Python code? · a) If a<=100: · b) If (a>=10) · d) None of the mentioned above

    Q31. What will be the output of the given program segment?

    b=5 If(a%b==0); Print(“Greater”)

    If(a//b==0):

    Print(“sooo sorry”)

    a) Example b)Greater sooo sorry

    b) Error d)none of the above

    Q32.what will be the output after the following statement?

    X=2 If x<5:

    Print(x)

    Pass

    c)2 d) none of these

    Q33. What will be the output of the following program on execution?

    If false:

    Print(”inside if block”)

    Elif true:

    Print(“inside if block”)

    Print(“inside else block”)

    a)inside if block B) inside elif block

    c) inside else block d) Error

    Q34. What will be output after execution of the following code?

    a=1 While true :

    If a%7==0:

    print(a)

    b) 1 2 3 4 5 6 7 d) none of these

    Q35. What will be the result of following Python code snippet after execution ?

    Str1=” “ I=0 Var2=1 While(i<3):

    Var1=1 If str1:

    Var2=var1*var2+5 Var2=var1*var2+1 I=i+1 Print(var2)

    Q36. Which of the following is the correct output of this program?

    i=0 While i<3:

    print(0)

    Q37. What will be the output after the following statement?

    For I in range(1,6):

    Print(I, end=’ ‘)

    If i==3:

    Q38. What will be the output of the following code ?

    While 1:

    If i%3==0:

    More chapterwise mcq for M3-R5.1

    Run these Python programs yourself — free

    Reading code is not the same as writing it. Type any program from these notes into our free online Python compiler (real Python 3 with NumPy, input() works), or study one of the explained programs with its output.

    Prepare for O Level with expert guidance

    Classroom training, practical labs and exam registration at Zed-King Institute, Kaithal.

    Drag me!