Skip to content

Clique-Mits/Python-Programs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

92 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python-Programs

Upload the programs name as program number and add a Comment line stating the Question.

1."Write a program to print the following pattern



* *
  *

The number of rows is entered by the user"

2.Write a menu-driven program to implement a calculator. The user should have the option of performing multiple calculations without having to restart the program

3.Write a program to print the first N Armstrong numbers

4.Write a program to print all palindrome numbers from 1 to N

5.Write a program to print all the factors of a number

7.Write a program to print the prime factorization of a number

8.Write a program to display the roots of a quadratic equation. Even if the roots are complex, they should be displayed in the format A+iB

9.Write a program to evaluate the sine series x-x^3/3!+x^5/5!-...

10.Write a program to find the GCD and LCM of two numbers

11.Write a program to print all prime numbers from 1 to N

12.Write a program to find the digital root of a number. A digital root is obtained by adding the digits of a number till the sum reaches a single digit. For example, digital root of 36 = 1

13.Write a program to sort a set of numbers using bubble sort

14.Write a program to generate a sequence 0,1,1,2,4,7,13,24,44,... using an array

15.Write a program to accept a set of numbers and identify the coprimes within that set. Coprimes are those numbers which have GCD = 1

16.Write a program to perform binary searching in a set of numbers

17.Write a program to add two polynomials. The coefficients are stored in separate arrays

18.Write a program to accept the output values for a logic function F(x,y,z). Identify the function from those output values

19.Write a program to accept a set of numbers. Then read a number and print the subsets which have a sum equal to this number

20.Write a program to accept a set of numbers and reverse the order

21.Write a program to subtract two polynomials. The coefficients are stored in separate arrays

22.Write a program to accept a set of numbers. Then read a number and print the subsets which have a product equal to this number

23.Write a program to print the second largest number among a set of numbers

24.Write a program to compute the fibonacci series using an array

25.Write a program to add two matrices

26.Write a program to sort the values in a matrix row-wise

27.Write a program to print the row sums and column sums of a matrix

28.Write a program to sort the values in a matrix in row-major form

29.Write a program to multiply two matrices "Consider a system for a Vigenere cipher system. The system consists of a matrix which is filled with a set of predefined values (even though it is normally considered for strings, we take it for numbers). The matrix is filled like: 0 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 0 2 3 4 5 6 7 8 9 0 1 3 4 5 6 7 8 9 0 1 2 4 5 6 7 8 9 0 1 2 3 5 6 7 8 9 0 1 2 3 4 6 7 8 9 0 1 2 3 4 5 7 8 9 0 1 2 3 4 5 6 8 9 0 1 2 3 4 5 6 7 9 0 1 2 3 4 5 6 7 8 Enter a number. Then take adjacent digits and lookup the table with 1st digit forming the row number and 2nd digit forming the column number. Then display the digit at that location. Repeat it for the rest of the number."

30.Write a program to convert a matrix to a sparse matrix. A sparse matrix is a special notation where only non-zero values of the matrix are represented using the notation <row number , column number , value>

31.Write a program to sort the values in a matrix column-wise

32.Write a program to sort the values in a matrix in column-major form

33.Write a program to find the transpose of a matrix

34.Write a program to print the largest row sum and column sum in a matrix

35.Write a program to print the upper triangle and lower triangle of a matrix

36.Write a program to reverse a string without using any library functions

37.Write a program to sort a set of strings using bubble sort

38.Write a program to compare two strings irrespective of the case without using any library function

39.Write a program to count the number of words in a string without using any library function

40.Write a program to reverse the odd words in a string without using any library function

41.Write a program to replace the occurrence of 'the' with 'a' in a string without using any library function. Replacement should occur even if 'the' occurs within a word

42.Write a program to accept a string and count the number of digits, capital letters and small letters without using any library function

43.Write a program to reverse the order of words in a string. You may use library functions

44.Write a program to print the length of each word in a string without using library functions

45.Write a program to count the occurrence of each vowel in a string without using any library functions

46.Write a program to check if a given string is a valid email address without using any library function

47.Write a program to accept a set of strings and sort them in the order of their lengths. Library functions are permitted

48.Write a program to implement binary search recursively

49.Write a program to print all factorials from 1 to N. Use recursion to check factorials

50.Write a program to print the fibonacci series using recursion

51.Write a program to implement any sorting system recursively

52.Write a function implementation to reverse a string without using any library function

53.Write a program to implement a sorting system for numbers using functions

54."Write a user-defined function that finds the square root of a number without using any library function. The square root can be found out like below. Consider 40. 36<40<49 So, square root lies between 6 and 7. Take the average. You get 6.5. The square is 42.25. So, the square root lies between 6 and 6.5. Again take average to get 6.25. The process repeats. Continue for a maximum of 6 iterations."56.

55."Write a program using macros to find the kernel value in the sine series expansion. The kernel value is defined as f(x,n)=(-1)^(n+1) x*n/n!

56.Use recursive implementations wherever possible, and implement the equation using macros"

57.Write a program to add two matrices. Separate functions should be written to read, add and print the matrices.

58.Write a program to implement linear search recursively

59.Write a function implementation for printing the first N prime numbers

60.Write a program to multiply two matrices. Separate functions should be written to read, multiply and print the matrices.

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages