Flow of Control

Class 11 · Computer Science · 13 Questions

1beginner💡 Understand2 marksShort Answer

What is the difference between else and elif construct of if statement?

2beginner💡 Understand2 marksShort Answer

What is the purpose of range() function? Give one example.

3intermediate💡 Understand3 marksShort Answer

Differentiate between break and continue statements using examples.

4beginner💡 Understand2 marksShort Answer

What is an infinite loop? Give one example.

5intermediate🔧 Apply6 marksVery Short

Find the output of the following program segments:

1beginner🔧 Apply4 marksLong Answer

Write a program that takes the name and age of the user as input and displays a message whether the user is eligible to apply for a driving license or not. (the eligible age is 18 years).

2beginner🔧 Apply4 marksLong Answer

Write a function to print the table of a given number. The number has to be entered by the user.

3intermediate🔧 Apply4 marksLong Answer

Write a program that prints minimum and maximum of five numbers entered by the user.

4intermediate🔧 Apply4 marksLong Answer

Write a program to check if the year entered by the user is a leap year or not.

5intermediate🔧 Apply4 marksLong Answer

Write a program to generate the sequence: −5, 10, −15, 20, −25…… upto n, where n is an integer input by the user.

6intermediate🔧 Apply4 marksLong Answer

Write a program to find the sum of 1+ 1/8 + 1/27……1/n³, where n is the number input by the user.

7intermediate🔧 Apply4 marksLong Answer

Write a program to find the sum of digits of an integer number, input by the user.

8intermediate🔧 Apply5 marksLong Answer

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 same when written in reverse order also. For example, 12321 is a palindrome while 123421 is not a palindrome]