Flow of Control
Class 11 · Computer Science · 13 Questions
What is the difference between else and elif construct of if statement?
What is the purpose of range() function? Give one example.
Differentiate between break and continue statements using examples.
What is an infinite loop? Give one example.
Find the output of the following program segments:
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).
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 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…… upto n, where n is an integer input by the user.
Write a program to find the sum of 1+ 1/8 + 1/27……1/n³, 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 same when written in reverse order also. For example, 12321 is a palindrome while 123421 is not a palindrome]