Вы находитесь на странице: 1из 26

Python

project
Manaswi
XI- A
23
Contents
1. WAP to input three no.s and calculate two sums as
per this: sum1 as the sum of all input no.s ;
sum2 as the sum of all input no.s.
2. WAP to input two no.s and print their LCM and HCF.
3. WAP to input 2 integer values and one arithmetic
operator and display the result by applying the input
arithmetic operator with those 2 values.
4. WAP to calculate the factorial of a number.
5. WAP to input a value greater than 100 and display all
palindrome values between 10 and that entered
value.
6. WAP to find the sum of the following series :
x – x^2/2! + x^3/3! – x^4/4! + x^5/5! – x^6/6!

7. WAP to display all Armstrong no.s between 2 given


values.
8. WAP to input a no. and print all Fibonacci numbers
below that.
9. WAP to input multiple random no.s and display
average of all even no.s, the loop should be continued
till some no.s are input and when no. 0 is input, the
loop should be terminated and result should be given.
10. WAP that reads three numbers (integers) and
prints them in ascending order.
11. WAP that takes a string with multiple words and
then capitalizes the first letter of each word and forms
a new string out of it.
12. WAP that reads a string and checks whether it is
a palindrome string or not.
13. WAP to count frequency of a given element in a
list of numbers.
14. WAP to read the contents of a list and count no.
of prime no.s and display.
15. WAP that rotates the elements of a list so that the
elements of the first index moves to second and
second to the third and so on and the last index
should be moved to first index.
16. WAP to search for an element in a given list of
numbers.
17. WAP to read the contents of a tuple and replace
all even values with half of that value and odd values
with double of its value.
18. WAP that create a tuple storing first 9 terms of
Fibonacci series.
19. WAP that input 2 tuple seq_a and seq_b else
print false.
20. Given the dictionary x={‘k1': ‘v1', ‘k2’: ‘v2', ‘k3'
: ‘v3'}. Create a dictionary with opposite mapping.
WAP to create the dictionary.
21. WAP that repeatedly asks the user to enter
product names and prices. Store all of these in a
dictionary whose names and prices. Store all of these
in a dictionary whose keys are the products names
and prices. When the user is done entering products
and prices, allow them to repeatedly enter a product’s
name and print the corresponding price or a message
if the product is not in the dictionary.
22. Create a dictionary whose keys are month name
and whose values are no. of days in the
corresponding month:
A) Ask the user to enter the month name and use the
dictionary to tell how many days are in month.
B) Print out all the keys in alphabetical order
C) Print out all the month with 31 days
D) Print out the key-value pair sorted by no. of days
in each month.
#1

OUTPUT:
#2

Output:
#3

Output:
#4

Output:
#5

Output:
#6

Output:
#7

Output:
#8

Output:
#9

Output:
#10

Output:

#11
Output:

#12
Output:
#13

Output:
#14

Output:

#15
Output:

#16

Output:
#17

Output:
#18

Output:
#19

Output:
#20

Output
#21

Output
#22

Output:

Вам также может понравиться