Page 144 - TechPluse_C8_Flipbook
P. 144
Lab Session Interdisciplinary
Write a program to:
Check whether the year input by the user is a leap year or not. (a year is a Leap year, if the year is
a multiple of 4 and isn’t a multiple of 100 or if the year is a multiple of 400).
Calculate the area of square or circle according to the given input by the user. If the input is 1,
then calculate area of square, else find the area of a circle. Ask the user to input the values for
square or circle, based on the input.
Find whether the given character is a vowel or not.
Check if the input number is positive or negative.
Input three numbers from the user, then print ‘You Won’ if the sum of input numbers is greater
than 1000.
Determine whether a given number is an Armstrong number or not.
Use the for loop to print the numbers 8, 11, 14, 17, 20, . . . , 83, 86, 89.
Use the for loop to print the numbers 100, 98, 96, . . . , 4, 2.
Print 1 to 100 using while loop.
Find out the sum of numbers within the range 1 to 100 using while loop.
Calculate the sum of first ten even numbers by using the while loop and the for loop.
Print first 20 odd numbers in decreasing order using while loop.
Teacher's Note
1. Discuss all the topics covered in this chapter with the students.
2. Tell the students, how to use indentation to define the body of the conditional statement.
3. Discuss the concept of control structures in Python with the students.
4. Discuss about all the iterative statements of Python with the students.
5. Explain the concept of functions to the students.
6. Go through all the topics covered in this chapter.
142 Premium Edition-VIII

