Advertisements
Chapters
![NCERT solutions for Computer Science [English] Class 11 chapter 6 - Flow of Control NCERT solutions for Computer Science [English] Class 11 chapter 6 - Flow of Control - Shaalaa.com](/images/computer-science-english-class-11_6:f845d20929ea4abdb3a8e0cf9f430d7f.jpg)
Advertisements
Solutions for Chapter 6: Flow of Control
Below listed, you can find solutions for Chapter 6 of CBSE NCERT for Computer Science [English] Class 11.
NCERT solutions for Computer Science [English] Class 11 6 Flow of Control Exercise [Pages 139 - 141]
What is the difference between the else and elif construct of the if statement?
What is the purpose of the range() function? Give one example.
Differentiate between break and continue statements using examples.
What is an infinite loop?
Give an example of an infinite loop.
Find the output of the following program segment:
a = 110
while a > 100:
print(a)
a -= 2
Find the output of the following program segment:
for i in range(20,30,2):
print(i)
Find the output of the following program segment:
country = 'INDIA'
for i in country:
print (i)
Find the output of the following program segment:
i = 0; sum = 0
while i < 9:
if i % 4 == 0:
sum = sum + i
i = i + 2
print (sum)
Find the output of the following program segment:
for x in range(1,4):
for y in range(2,5):
if x * y > 10:
break
print (x * y)
Find the output of the following program segment:
var = 7
while var > 0:
print ('Current variable value: ', var)
var = var -1
if var == 3:
break
else:
if var == 6:
var = var -1
continue
print ("Good bye!")
Programming Exercises
Write a program that takes the name and age of the user as input and displays a message about whether the user is eligible to apply for a driving license or not. (the eligible age is 18 years).
Write a function to print the table of a given number. The number has to be entered by the user.
Write a program that prints the minimum and maximum of five numbers entered by the user.
Write a program to check if the year entered by the user is a leap year or not.
Write a program to generate the sequence: –5, 10, –15, 20, –25….. up to n, where n is an integer input by the user.
Write a program to find the sum of 1 + 1/8 + 1/27......1/n3, where n is the number input by the user.
Write a program to find the sum of digits of an integer number, input by the user.
Write a function that checks whether an input number is a palindrome or not.
[Note: A number or a string is called palindrome if it appears the same when written in reverse order also. For example, 12321 is a palindrome while 123421 is not a palindrome.]
Write a program to print the following pattern:
* * * * * * * * * * * * * |
Write a program to print the following pattern:
1 2 1 2 3 2 1 2 3 4 3 2 1 2 3 4 5 4 3 2 1 2 3 4 5 |
Write a program to print the following pattern:
1 2 3 4 5 1 2 3 4 1 2 3 1 2 1 |
Write a program to print the following pattern:
* * * * * * * * |
Write a program to find the grade of a student when grades are allocated as given in the table below.
Percentage of Marks | Grade |
Above 90% | A |
80% to 90% | B |
70% to 80% | C |
60% to 70% | D |
Below 60% | E |
The percentage of the marks obtained by the student is input into the program.
Case Study-Based Questions
Let us add more functionality to our SMIS developed in Chapter 5.
6.1 Write a menu-driven program that has options to
- accept the marks of the student in five major subjects in Class X and display the same.
- calculate the sum of the marks of all subjects. Divide the total marks by the number of subjects (i.e. 5), calculate percentage = total marks/5, and display the percentage.
- Find the grade of the student as per the following criteria:
Criteria | Grade |
percentage > 85 | A |
percentage < 85 && percentage >= 75 | B |
percentage < 75 && percentage >= 50 | C |
percentage > 30 && percentage <= 50 | D |
percentage <30 | Reappear |
Let’s peer review the case studies of others based on the parameters given under “DOCUMENTATION TIPS” at the end of Chapter 5 and provide feedback to them.
Solutions for 6: Flow of Control
![NCERT solutions for Computer Science [English] Class 11 chapter 6 - Flow of Control NCERT solutions for Computer Science [English] Class 11 chapter 6 - Flow of Control - Shaalaa.com](/images/computer-science-english-class-11_6:f845d20929ea4abdb3a8e0cf9f430d7f.jpg)
NCERT solutions for Computer Science [English] Class 11 chapter 6 - Flow of Control
Shaalaa.com has the CBSE Mathematics Computer Science [English] Class 11 CBSE solutions in a manner that help students grasp basic concepts better and faster. The detailed, step-by-step solutions will help you understand the concepts better and clarify any confusion. NCERT solutions for Mathematics Computer Science [English] Class 11 CBSE 6 (Flow of Control) include all questions with answers and detailed explanations. This will clear students' doubts about questions and improve their application skills while preparing for board exams.
Further, we at Shaalaa.com provide such solutions so students can prepare for written exams. NCERT textbook solutions can be a core help for self-study and provide excellent self-help guidance for students.
Concepts covered in Computer Science [English] Class 11 chapter 6 Flow of Control are Repetition, The ‘For’ Loop, The ‘While’ Loop, Types of Statements in Loop, Break Statement, Continue Statement, Nested Loops, Flow of Control, Selection, Indentation.
Using NCERT Computer Science [English] Class 11 solutions Flow of Control exercise by students is an easy way to prepare for the exams, as they involve solutions arranged chapter-wise and also page-wise. The questions involved in NCERT Solutions are essential questions that can be asked in the final exam. Maximum CBSE Computer Science [English] Class 11 students prefer NCERT Textbook Solutions to score more in exams.
Get the free view of Chapter 6, Flow of Control Computer Science [English] Class 11 additional questions for Mathematics Computer Science [English] Class 11 CBSE, and you can use Shaalaa.com to keep it handy for your exam preparation.