Class Xi First Worksheet
Class Xi First Worksheet
>10000 20%
<=7000 10%
14.Write a program to accept percentage and display the Category according to the following
criteria :
Percentage Category
< 40 Failed
>=40 & <55 Fair
>=55 & <65 Good
>=65 Excellent
15.Accept three sides of a triangle and check whether it is an equilateral, isosceles or scalene
triangle.
Note :An equilateral triangle is a triangle in which all three sides are equal.
A scalene triangle is a triangle that has three unequal sides.
An isosceles triangle is a triangle with (at least) two sides
16.Write a program to accept two numbers and mathematical operators and perform
operation accordingly.
like: Enter First Number: 7
Enter Second Number : 9
Enter operator : +
Your Answer is : 16
17.Accept the age, sex (‘M’, ‘F’), number of days and display the wages accordingly
F 750
F 850
If age does not fall in any range then display the following message: “Enter appropriate age”
18.Accept three numbers from the user and display the second largest number.
19.Accept three sides of triangle and check whether the triangle is possible or not.
(triangle is possible only when sum of any two sides is greater than 3rd side)
20.Accept the electric units from user and calculate the bill according to the following rates.
First 100 Units : Free
Next 200 Units : Rs 2 per day.
Above 300 Units : Rs 5 per day.
if number of unit is 500 then total bill = 0 +400 + 1000 = 1400
21.Accept the number of days from the user and calculate the charge for library according to
following :
First five days : Rs 2/day.
Six to ten days : Rs 3/day.
Ten to 15 days : Rs 4/day
After 15 days : Rs 5/day
22.Accept the kilometers covered and calculate the bill according to the following criteria:
First 10 Km Rs11/km
Next 90Km Rs 10/km
After that Rs9/km
23.Accept the marks of English, Math and Science, Social Studies Subject and display the
stream allotted according to following
All Subjects more than 80 marks — Science Stream
English >80 and Math, Science above 50 –Commerce Stream
English > 80 and Social studies > 80 — Humanities
LOOPING
1. Print numbers from 1 to 10 using a for loop
2. Calculate the sum of numbers from 1 to 10 using a for loop
3. Print the elements of a list using a for loop
4. Calculate the product of elements in a list using a for loop
5. Print even numbers from 1 to 10 using a for loop
6. Print numbers in reverse from 10 to 1 using a for loop
7. Print characters of a string using a for loop Find the largest number in a list using
a for loop:
8. Find the average of numbers in a list using a for loop
9. Print all uppercase letters in a string using a for loop
10. Count the number of vowels in a string using a for loop
11. Print a pattern of stars using nested for loops
12. Write a program to find the sum of all even numbers that falls between two numbers
(exclusive both numbers) entered from the user using while loop
13. Write a program to check whether a number is prime or not using while loop
14. Write a program to find the product of the digits of a number accepted from the user.
15. Write a program to find the sum of the digits of a number accepted from the user.
16. Write a program to reverse the number accepted from user using while loop.
17. Write a program to display the number names of the digits of a number entered by
user, for example if the number is 231 then output should be Two Three One
18. Write a program to print the Fibonacci series till n terms (Accept n from user)
using while loop.
19. Write a program to print the factorial of a number accepted from user.
20. Write a program to check whether a number is Armstrong or not. (Armstrong number
is a number that is equal to the sum of cubes of its digits for example: 153 = 1^3 + 5^3
+ 3^3.)
21. Write a program to add first n terms of the following series using a for loop:
1/1! + 1/2! + 1/3! +.....+ 1/n!
22. Write a program to enter the numbers till the user wants and at the end it should
display the sum of all the numbers entered.
23. Write a program to enter the numbers till the user enters ZERO and at the end it
should display the count of positive and negative numbers entered.
24. Write a program to find the HCF of two numbers entered from the user.
25. Write a program to convert Decimal to Binary.
26. Write a program to convert Binary to Decimal.
27. Write a program to check whether a number is palindrome or not.
28. Write a Program to print all the characters in the string ‘PYTHON’ using while loop
29. Write a program to print only odd numbers from the given list using while loop. L =
[23, 45, 32, 25, 46, 33, 71, 90]
30. Write a program to print all the factors of a number using for loop.
31. Write a python program to get the following output
1—–49
2—–48
3—–47
..
..
48—–2
49—–1
32. Write a Python program to find those numbers which are divisible by 7 and multiples of
5, between 1500 and 2700 (both included)
33. Write a Python program to convert temperatures to and from Celsius and Fahrenheit.
[ Formula : c/5 = f-32/9 [ where c = temperature in Celsius and f = temperature in
Fahrenheit ]
Expected Output :
60°C is 140 in Fahrenheit
45°F is 7 in Celsius
34. Write a Python program to construct the following pattern, using a nested for loop.
*
**
***
****
*****
****
***
**
*
35. Write a Python program that accepts a word from the user and reverses it
36. Write a Python program to count the number of even and odd numbers in a series of
numbers
Sample numbers : numbers = (1, 2, 3, 4, 5, 6, 7, 8, 9)
Expected Output :
Number of even numbers : 5
Number of odd numbers : 4
37. Write a Python program that prints each item and its corresponding type from the
following list.
Sample List : datalist = [1452, 11.23, 1+2j, True, 'w3resource', (0, -1), [5, 12],
{"class":'V', "section":'A'}]
38. Write a Python program that iterates the integers from 1 to 50. For multiples of three
print "Fizz" instead of the number and for multiples of five print "Buzz". For numbers
that are multiples of three and five, print "FizzBuzz".
Sample Output :
fizzbuzz
1
2
fizz
4
buzz
39. Write a Python program that accepts a string and calculates the number of digits and
letters.
Sample Data : Python 3.2
Expected Output :
Letters 6
Digits 2