0% found this document useful (0 votes)
31 views2 pages

Chapter 9 Flow of Control

class 11th CS test Question paper for chapter 9th
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views2 pages

Chapter 9 Flow of Control

class 11th CS test Question paper for chapter 9th
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Kakka International School

Nalkheda
Subject: Computer Science
Class: 11
Chapter : 9
Time: 3 hours Maximum Marks: 50
General Instructions:
* All questions are compulsory.
* Read each question carefully before answering.
* Write your answers neatly and legibly.
* Use appropriate indentation and spacing to make your code readable.
* Diagrams and flowcharts should be drawn neatly and labeled clearly.
Section A (15 marks)
* Multiple Choice Questions (5 marks)
(a) Which of the following is not a loop control statement in Python?
(i) break
(ii) continue
(iii) goto
(iv) pass
(b) What is the output of the following code?
for i in range(1, 5):
if i == 3:
break
print(i)

(i) 1 2 3
(ii) 1 2
(iii) 1 2 3 4
(iv) 1 2 3 4 5
(c) Which loop is most suitable for iterating over a sequence of numbers?
(i) while loop
(ii) for loop
(iii) do-while loop
(iv) nested loop
(d) What is the purpose of the continue statement in a loop?
(i) To exit the loop immediately
(ii) To skip the current iteration and continue to the next one
(iii) To repeat the current iteration
(iv) To pause the loop execution
(e) Which of the following is a valid way to define a multi-line comment in Python?
(i) /* This is a comment */
(ii) # This is a comment
(iii) ''' This is a comment '''
(iv) // This is a comment

* Short Answer Questions (10 marks)

(a) Explain the difference between the if and if-else statements.


(b) Write a Python code snippet to check if a given number is even or odd.
(c) What is the purpose of nested loops? Give an example.
(d) How can you use the break statement to exit a loop prematurely?
(e) What is the difference between a while loop and a for loop?

Section B (15 marks)


* Programming Questions
(a) Write a Python program to print the table of a given number using a loop.
(c) Write a Python program to check the given number is divisible by 2 or not
(b) Write programs to print the following patterns using nested loops:

 a.
 *
 **
 ***
 ****
*****

Section C (20 marks)


Case Study Based Question (20 marks)
A company maintains a database of its employees, including their names, employee IDs, and salaries. The company
wants to implement a bonus system based on the following criteria:
1. Employees with a salary less than or equal to 50,000 will receive a bonus of 10% of their salary.
2. Employees with a salary greater than 50,000 but less than or equal to 1,00,000 will receive a bonus of 8% of
their salary.
3. Employees with a salary greater than 1,00,000 will receive a bonus of 5% of their salary.
Write a Python program to calculate the bonus for each employee and print the employee's bonus amount.

You might also like