Edzy
AI TutorResourcesToolsCompareBuy
SearchDownload AppLogin
Edzy

Edzy for Classes 6-12

Edzy is a personal AI tutor for CBSE and State Board students, with curriculum-aligned guidance, practice, revision, and study plans that adapt to each learner.

  • Email: always@edzy.ai
  • Phone: +91 96256 68472
  • WhatsApp: +91 96256 68472
  • Address: Sector 63, Gurgaon, Haryana

Follow Edzy

Browse by Class

  • CBSE Class 6
  • CBSE Class 7
  • CBSE Class 8
  • CBSE Class 9
  • CBSE Class 10
  • CBSE Class 11
  • CBSE Class 12
Explore the CBSE resource hub

Explore Edzy

  • Study Resources
  • Free Study Tools
  • Best Apps for Board Exams
  • Edzy vs ChatGPT
  • About Us
  • Why We Built Edzy
  • Blog
  • CBSE AI Tutor

Support & Legal

  • Help & FAQs
  • Accessibility
  • Privacy Policy
  • Terms & Conditions
  • Refund Policy
  • Cookie Policy
  • Site Directory

© 2026 Edzy. All rights reserved.

Curriculum-aligned learning paths for students in Classes 6-12.

CBSE
Class 11
Computer Science
Computer Science
Flow of Control
Question Bank

Question Bank - Flow of Control

Practice Hub

Question Bank: Flow of Control

This chapter explains the flow of control in programming, covering how to make decisions and repeat tasks in Python. Understanding this is crucial for creating efficient programs.

Structured practice

Question Bank - Flow of Control

Q1.

What is the primary purpose of the flow of control in a program?

Single Answer MCQ
Q-00067655
View explanation
Q2.

Which control structure allows a program to make decisions?

Single Answer MCQ
Q-00067656
View explanation
Q3.

In Python, which statement is used to implement branching?

Single Answer MCQ
Q-00067657
View explanation
Q4.

What is the significance of indentation in Python?

Single Answer MCQ
Q-00067658
View explanation
Q5.

In the provided difference program, what will be the output if num1 is 3 and num2 is 7?

Single Answer MCQ
Q-00067659
View explanation
Q6.

Which of the following is NOT a part of flow control in Python?

Single Answer MCQ
Q-00067660
View explanation
Q7.

In an if...else statement, what happens if the condition is false?

Single Answer MCQ
Q-00067661
View explanation
Q8.

What does the following code segment return if the variables are num1 = 5 and num2 = 2? if num1 > num2: result = num1 - num2 else: result = num2 - num1

Single Answer MCQ
Q-00067662
View explanation
Q9.

In Python, how is a while loop structured regarding its control flow?

Single Answer MCQ
Q-00067663
View explanation
Q10.

What will happen if the condition in an if statement is always false?

Single Answer MCQ
Q-00067664
View explanation
Q11.

Which of the following properly describes the role of the 'break' statement?

Single Answer MCQ
Q-00067665
View explanation
Q12.

What is one potential disadvantage of using a nested loop?

Single Answer MCQ
Q-00067666
View explanation
Q13.

What is the primary difference between 'break' and 'continue' statements?

Single Answer MCQ
Q-00067667
View explanation
Q14.

How can the flow of control be visualized for complex conditions?

Single Answer MCQ
Q-00067668
View explanation
Q15.

What is the purpose of an if statement in Python?

Single Answer MCQ
Q-00067671
View explanation
Q16.

Which of the following correctly implements an if-else statement in Python?

Single Answer MCQ
Q-00067673
View explanation
Q17.

What will the following code output if the user enters '7'? number = int(input('Enter a number: ')) if number > 10: print('Greater than 10') else: print('10 or less')

Single Answer MCQ
Q-00067675
View explanation
Q18.

What happens if the condition of an if statement is false?

Single Answer MCQ
Q-00067677
View explanation
Q19.

Which of the following Python constructs is used for multiple conditions?

Single Answer MCQ
Q-00067679
View explanation
Q20.

In which case would you use an elif statement in Python?

Single Answer MCQ
Q-00067681
View explanation
Q21.

What will be the output of the following code if input is -5? if number > 0: print('Positive') elif number < 0: print('Negative') else: print('Zero')

Single Answer MCQ
Q-00067683
View explanation
Q22.

What is the output of this code if the user enters 10? signal = input('Enter the signal color: ') if signal == 'red': print('STOP') elif signal == 'green': print('GO') else: print('SLOW')

Single Answer MCQ
Q-00067685
View explanation
Q23.

Which keyword allows for checking a secondary condition in Python?

Single Answer MCQ
Q-00067687
View explanation
Q24.

What is a common error if you forget to use indentation in Python after an if statement?

Single Answer MCQ
Q-00067689
View explanation
Q25.

Which of the following is NOT a correct if statement in Python?

Single Answer MCQ
Q-00067691
View explanation
Q26.

What structure would you use to exit a loop based on a condition?

Single Answer MCQ
Q-00067693
View explanation
Q27.

What will be the output of the following code? a = 8 if a < 5: print('Less than 5') elif a < 10: print('Less than 10') else: print('10 or more')

Single Answer MCQ
Q-00067695
View explanation
Q28.

Which part of the if statement allows for code execution only if the condition is true?

Single Answer MCQ
Q-00067697
View explanation
Q29.

How would you handle cases where multiple logical conditions need to be evaluated in one if statement?

Single Answer MCQ
Q-00067699
View explanation
Q30.

What is the primary purpose of using loops in programming?

Single Answer MCQ
Q-00067700
View explanation
Q31.

Which of the following is NOT a type of loop in Python?

Single Answer MCQ
Q-00067701
View explanation
Q32.

What will be the output of the following code snippet?\n\ncount = 1\nwhile count <= 5:\n print(count)\n count += 1

Single Answer MCQ
Q-00067702
View explanation
Q33.

In which case would you prefer a 'for' loop over a 'while' loop?

Single Answer MCQ
Q-00067703
View explanation
Q34.

What condition must be met for a while loop to terminate?

Single Answer MCQ
Q-00067704
View explanation
Q35.

Assuming a variable 'x' starts at 0, what will be the value of 'x' after the following loop executes?\n\nfor i in range(5):\n x += 2

Single Answer MCQ
Q-00067705
View explanation
Q36.

What is the purpose of the 'continue' statement in a loop?

Single Answer MCQ
Q-00067706
View explanation
Q37.

Which statement best describes an infinite loop?

Single Answer MCQ
Q-00067707
View explanation
Q38.

How would you correct an infinite loop caused by forgetting to update the control variable?

Single Answer MCQ
Q-00067708
View explanation
Q39.

In the context of loops, what does the term 'iteration' refer to?

Single Answer MCQ
Q-00067709
View explanation
Q40.

What will happen if the loop condition in a for loop is always true?

Single Answer MCQ
Q-00067710
View explanation
Q41.

When would you use a nested loop?

Single Answer MCQ
Q-00067711
View explanation
Q42.

What is a key benefit of using loops in programming?

Single Answer MCQ
Q-00067712
View explanation
Q43.

What does the statement 'break' do inside a loop?

Single Answer MCQ
Q-00067713
View explanation
Q44.

If you have a loop that prints messages based on a list of items, which looping structure would be most efficient?

Single Answer MCQ
Q-00067714
View explanation
Q45.

What is the purpose of indentation in Python?

Single Answer MCQ
Q-00067715
View explanation
Q46.

Which of the following statements about indentation in Python is true?

Single Answer MCQ
Q-00067716
View explanation
Q47.

What will happen if a Python program has inconsistent indentation?

Single Answer MCQ
Q-00067717
View explanation
Q48.

What is the recommended approach to indentation in Python?

Single Answer MCQ
Q-00067718
View explanation
Q49.

In the following code snippet, which line requires proper indentation to execute correctly? if condition: print('Condition is true')

Single Answer MCQ
Q-00067719
View explanation
Q50.

What character is often used to represent one level of indentation in Python?

Single Answer MCQ
Q-00067720
View explanation
Q51.

In Python, which of the following is considered a proper indentation format?

Single Answer MCQ
Q-00067721
View explanation
Q52.

Why is indentation considered a part of syntax in Python?

Single Answer MCQ
Q-00067722
View explanation
Q53.

What error occurs if the following code has inconsistent indentation? if x > 10: print(x) print('Done')

Single Answer MCQ
Q-00067723
View explanation
Q54.

What will be the output of the following code if indented correctly? if 2 < 3: print('A') print('B') else: print('C') print('D')

Single Answer MCQ
Q-00067724
View explanation
Q55.

In a nested if statement, how should the indented blocks be structured?

Single Answer MCQ
Q-00067725
View explanation
Q56.

Which of the following statements about Python's indentation rules is incorrect?

Single Answer MCQ
Q-00067726
View explanation
Q57.

What is the maximum level of indentation allowed in Python?

Single Answer MCQ
Q-00067727
View explanation
Q58.

Why might a programmer prefer using spaces over tabs for indentation?

Single Answer MCQ
Q-00067728
View explanation
Q59.

In which scenario can indentation lead to unintended outcomes in a program?

Single Answer MCQ
Q-00067729
View explanation
Q60.

What is the primary purpose of the break statement in a loop?

Single Answer MCQ
Q-00067745
View explanation
Q61.

In which situation would using a continue statement be most appropriate?

Single Answer MCQ
Q-00067746
View explanation
Q62.

What will be the output of the following code segment? for i in range(5): if i == 3: break print(i)

Single Answer MCQ
Q-00067747
View explanation
Q63.

What happens when a continue statement is encountered in a for loop?

Single Answer MCQ
Q-00067748
View explanation
Q64.

Which of the following correctly describes an infinite loop?

Single Answer MCQ
Q-00067749
View explanation
Q65.

What is the result of the following code? for i in range(10): if i % 2 == 0: continue print(i)

Single Answer MCQ
Q-00067750
View explanation
Q66.

How does the break statement affect loop flow?

Single Answer MCQ
Q-00067751
View explanation
Q67.

If a continue statement is placed inside nested loops, where does the control go?

Single Answer MCQ
Q-00067752
View explanation
Q68.

What is the output of the following code segment? num = 5 while num > 0: num -= 1 if num == 2: break print(num)

Single Answer MCQ
Q-00067753
View explanation
Q69.

Which of the following statements about continue and break is TRUE?

Single Answer MCQ
Q-00067754
View explanation
Q70.

When might you prefer to use the continue statement over the break statement?

Single Answer MCQ
Q-00067755
View explanation
Q71.

Which of the following code snippets would result in an infinite loop?

Single Answer MCQ
Q-00067756
View explanation
Q72.

In the context of loops, what is the primary difference between break and continue?

Single Answer MCQ
Q-00067757
View explanation
Q73.

What is a nested loop?

Single Answer MCQ
Q-00067758
View explanation
Q74.

What will be the output if the following code is executed? for i in range(2): for j in range(3): print(i, j)

Single Answer MCQ
Q-00067759
View explanation
Q75.

In a nested loop, if the inner loop has a 'break' statement, what happens?

Single Answer MCQ
Q-00067760
View explanation
Q76.

What pattern does the following code produce? num = 3 for i in range(1, num + 1): for j in range(1, i + 1): print(j, end=' ') print()

Single Answer MCQ
Q-00067761
View explanation
Q77.

What will be the final output of this code? for i in range(3): for j in range(2): if i == 1 and j == 1: break print(i, j)

Single Answer MCQ
Q-00067762
View explanation
Q78.

Which of the following statements is true regarding nested loops?

Single Answer MCQ
Q-00067763
View explanation
Q79.

What will be displayed by the following code? for i in range(2): for j in range(2): print(i * j, end=' ')

Single Answer MCQ
Q-00067764
View explanation
Q80.

How is the performance of nested loops typically affected by their depth?

Single Answer MCQ
Q-00067765
View explanation
Q81.

What will the following code output? for x in range(3): for y in range(x): print(x, y)

Single Answer MCQ
Q-00067766
View explanation
Q82.

In the context of nested loops, what does 'loop unrolling' refer to?

Single Answer MCQ
Q-00067767
View explanation
Q83.

If you use a continue statement in a nested loop, which of the following occurs?

Single Answer MCQ
Q-00067768
View explanation
Learn Better On The App
Free learning flow

Learn Without Limits

Access NCERT content for free with a cleaner, faster way to revise every day.

Chapter summaries
Revision tools

Faster access to practice, revision, and daily study flow.

Edzy mobile app preview