Uploaded by Cir Cus

Practical File 23-24

advertisement
Grade-11
Practical Questions
1. WAP to display cube of a number.
2. WAP to Input a number and find odd or even by using if-else.
3. WAP to obtain 3 numbers and print their sum.
4. WAP to Input radius and find an area of a circle.
5. WAP to input three numbers and swap them.
6. WAP to find the average of three numbers.
7. Input two numbers and display the larger / smaller number.
8. Input three numbers and display the largest / smallest number.
9. Generate the following patterns using nested loop.
Pattern-1
Pattern-2
Pattern-3
10.Count and display the number of vowels, uppercase, lowercase
characters in string.
11.Input a string and determine whether it is a palindrome or not.
Logic:
12.Compute the least common multiple of two integers.
13.Determine whether a number is a palindrome.
14.Determine whether a number is a perfect number.
Logic: A perfect number is a positive integer that is equal to the sum of
its positive divisors, excluding the number itself. For instance, 6 has
divisors 1, 2 and 3 (excluding itself), and 1 + 2 + 3 = 6, so 6 is a perfect
number.
15.Write a program to find the largest number in a list.
16.Write a program to Input a list of numbers and find the smallest and
largest number from the list.
17. Write a program to Input a list of elements, search for a given element
in the list
18. Write a Python script to concatenate following dictionaries to create a
new one .
19.Python Program to Check if a Given Key Exists in a Dictionary or Not
20. Create a dictionary with the roll number, name and marks of n
students in a class and display the names of students who have scored
marks above 75.
Download