Python Programs-Set 1 (P1-P10) | Python Programs-Set 2 (P11-P20) |
---|---|
Write a program to generate given pattern in Python. | The user to enter the value of n and calculate the factorial of n using recursion. |
Write a program to generate the following pattern in Python. | The user to enter the values of a and b and calculate a to the power of b, using recursion. |
Write a program to traverse a string. | Write a program that calculates the mean of numbers entered by the user. |
Write a program to find the length of the string entered by the user. | Write a program that calculates the mode of numbers entered by the user |
Consider you have to enter a string and displace two characters to the right.How will you do it? | Write a program that calculates the median of numbers entered by the user. |
Write a program to implement a linear search. | Write a program that finds the maximum of the numbers from a given list. |
Generate a n × m , matrix, wherein each element (aij), is given by ai, j = 5 × (i + j)2 | Write a function that finds the minimum of the numbers from a given list. |
In the following program the first list’s second element is itself a list. Its first element can be accessed by writing hb[0][1] and the first letter of the first element of the nested list would be hb[0][1][0]. | Write a function that finds the maximum of three numbers entered by the user. |
The user to enter the value of n and find the nth Fibonacci term. | Write a program that searches for an element from a given list. |
Python Program-Set 3(P21-P30) | Python Program-Set 4(P31-P40) |
---|---|
White a program that takes two lists as input and returns the merged list. | How will you remove the duplicate element of the list? |
To print given number of *s in a row | Write the program to find the lists consist of at least one common element. |
To print square pattern with * symbols | Write a program to create a list of 6 odd integers. Replace the fourth element with a list of 3 even integers. After that perform Flatten, sort and print the list. |
To print square pattern with provided fixed digit. | A list contains 10 integers generated randomly. Give any input and show its position in the list. |
To print square pattern with provided fixed digit in every row | Suppose a list has 10 numbers. Write a program to removes duplicates. |
To print square pattern with fixed alphabet symbol | In Class 6, some of the students got negative marks and some students got positive marks. How will you create lists of positive and negative Numbers separately? |
To print square pattern with alphabet symbols | How will you convert list into uppercase? |
To print square pattern with digits | Can we create empty list object? |
To print square pattern with alphabet symbols in dictionary order | Explain split() function. |
Python Program-Set 5(P41-P50) | |
---|---|
Write a program to traverse a string. | |
Consider you have to enter a string and displace two characters to the right.How will you do it? | |
Write a program to create a set of 5 randomly generated numbers in the range 10 to 30. Find how many of these numbers are less than 20. Delete all numbers which are greater than 25. | |
What is the difference between add() and update() functions in set? | |
How will you use remove function in Python? | |
How will you use discard function in Python? | |
A set contains names which begin either with A or with B. write a program to separate out the names into two sets, one containing names beginning with A and another containing names beginning with B. | |
What is the difference between the two set functions— discard() and remove() | |
How will you remove all duplicate elements present in a list? | |