Class 11 IP Chapter 5 Back Exercise Part C Solutions Sumita Arora New Syllabus / Listing11IPSA, Uncategorized / By Neha 1. Write a Python script that asks the user to enter a length in centimetres. If the user enters a negative length, the program should tell the user that the entry is invalid. Otherwise, the program should convert the length to inches and print out the result. There are 2.54 centimetres in an inch. # Code ...click here for answer 2. A store charges ? 120 per item if you bu^ less than 10 items. If you buy between 10 and 99 items, the cost is ? 100 per item. If you buy 100 or more items, the cost is ^ 70 per item. Write a program that asks the user how many items they are buying and prints the total cost. # Code ...click here for answer 3. Write a program that asks the user for two numbers and prints Close if the numbers are within .001 of each other and Not close otherwise. ...click here for answer 4. A year is a leap year if it is divisible by 4, except that years divisible by 100 are not leap years unless they are also divisible by 400. Write a program that asks the user for a year and prints out whether it is i leap year or not. ...click here for answer 5. Write a program to input length of three sides of a triangle. Then check if these sides will form a triangle or not. (Rule is : a + b >,c ; b + c > a ; c + a > b ) ...click here for answer 6. Write a short program to input a digit and print it in words. ...click here for answer 7. Write a short program to print first n odd numbers in descending order. ...click here for answer 8. Write a short program to print the following series : ...click here for answer 9. Write a short program to find average of list of numbers entered through keyboard. ...click here for answer 10. Write a program to take an integer a as an input and check whether it ends with 4 or 8. If it ends with 4 print “ends with 4”, if it ends with 8, print “ends with 8”, otherwise print “ends with neither”. a = ...click here for answer 11. Write a program to take N (N > 20) as an input from the user. Print numbers from 11 to N. When the number is a multiple of 3, print “Tipsy”, when it is a multiple of 7, print “Topsy”. When it is a multiple of both, print “TipsyTopsy”. ...click here for answer 12. Write a short program to find largest number of a list of numbers entered through keyboard. ...click here for answer 13. Write a program to input N numbers and then print the second largest number. ...click here for answer 14. Given a list of integers, write a program to find those which are palindromes. For example, the number 4321234 is a palindrome as it reads the same from left to right and from right to left. l = ...click here for answer 15. Write a Python program to print every integer between 1 and n divisible by m. Also report whether the number that is divisible by m is even or odd. ...click here for answer 16. Write a program to accept the age of n employees and count the number of persons in the following age- group : (i) 26 – 35 (ii) 36 – 45 (iii) 46 – 55. ...click here for answer 17. Write a program using nested loops to produce a rectangle of *’s with 6 rows and 20 *’s per row. # Output ...click here for answer 18. Given three numbers A, B and C, write a program to write their values in an ascending order. For example, if A = 1,2, B = 10, and C =15, your program should print out : Smallest number = 10 Next higher number = 12 Highest number = 15 a, b, ...click here for answer 19. Ask the user to enter a temperature in Celsius. The program should print a message based on the temperature : # Code ...click here for answer 20. Write a program to calculate correlation coefficient after collecting data about 10 of your classmates are in the form of ...click here for answer 21. Write a program to calculate standard deviation for a batsman’s score in last 10 matches. ...click here for answer