Class XI IP Assignment
Class XI IP Assignment
Write Python code for the following in Notebook along with output:
1. Enter 2 nos and display addition, subtraction, multiplication and division operation on those
numbers.
2. Enter a number and check its odd or even.
3. Enter 3 numbers and check the highest number out of those entered.
4. Enter a number and check its positive, negative or zero.
5. Enter 2 nos and swap them. Eg a=10, b=20 then after swap a=20 b=10
6. Enter name of the student and 3 subject marks: if child secured <33 in any one subject then
result is fail. If child secured >=33 in all subjects result is Pass and calculate total and
percentage.
Display the result at the end with total and percentage.
7. Enter a year and check its leap or not.
8. Enter number n and calculate sum of odd and even numbers between 1 to n. Display sum of
odd and even values also.
9. Enter a number and Display table of that number.
10. Enter a number and check its prime or not.
11. Enter a starting and ending number. Check prime numbers between the range.
12. Enter a string and check its palindrome or not.
13. Enter a number and check its palindrome or not.
14. Enter a number and calculate sum of each digit. Eg n=123 sum is 6