Wednesday, 29 November 2023

100 Python questions, one for each day of the challenge:


1 Print the length of the string "Hello, world!".

2 Print the sum of the numbers 1 and 2.

3 Print the Fibonacci sequence up to the 10th term.

4 Check whether a number is prime or not.

5 Find the factorial of a number.

6 Print a multiplication table for a given number.

7 Check whether a string is a palindrome or not.

8 Convert a temperature from Celsius to Fahrenheit.

9 Convert a temperature from Fahrenheit to Celsius.

10 Check whether a year is a leap year or not.

11 Write a function to check whether a string is a pangram or not.

12 Write a function to find the longest common substring of two strings.

13 Write a function to reverse a string.

14 Write a function to check whether a number is a perfect square or not.

15 Write a function to find the greatest common divisor (GCD) of two numbers.

16 Write a function to find the least common multiple (LCM) of two numbers.

17 Write a function to check whether a number is an Armstrong number or not.

18 Write a function to find the kth permutation of a given set of numbers.

19 Write a function to find the next lexicographical permutation of a given string.

20 Write a function to check whether a graph is bipartite or not.

21 Write a function to find the shortest path between two nodes in a graph.

22 Write a function to find the minimum spanning tree of a graph.

23 Write a function to find the diameter of a tree.

24 Write a function to check whether a tree is a binary search tree or not.

25 Write a function to insert a node into a binary search tree.

26 Write a function to delete a node from a binary search tree.

27 Write a function to search for a node in a binary search tree.

28 Write a function to find the inorder successor of a node in a binary search tree.

29 Write a function to find the preorder successor of a node in a binary search tree.

30 Write a function to find the postorder successor of a node in a binary search tree.

31 Write a function to find the level order traversal of a binary tree.

32 Write a function to find the height of a binary tree.

33 Write a function to check whether a binary tree is balanced or not.

34 Write a function to convert an infix expression to a postfix expression.

35 Write a function to convert a postfix expression to an infix expression.

36 Write a function to evaluate a postfix expression.

37 Write a function to find the maximum depth of a nested list.

38 Write a function to flatten a nested list.

39 Write a function to check whether a linked list is a palindrome or not.

40 Write a function to reverse a linked list.

41 Write a function to insert a node into a linked list.

42 Write a function to delete a node from a linked list.

43 Write a function to search for a node in a linked list.

44 Write a function to find the middle node in a linked list.

45 Write a function to find the nth node from the end of a linked list.

46 Write a function to merge two sorted linked lists.

47 Write a function to find the intersection point of two linked lists.

48 Write a function to find the union of two linked lists.

49 Write a function to check whether a linked list is circular or not.

50 Write a function to find the length of a linked list.

51 Write a function to find the median of a list of numbers.

52 Write a function to find the mode of a list of numbers.

53 Write a function to find the range of a list of numbers.

54 Write a function to find the variance of a list of numbers.

55 Write a function to find the standard deviation of a list of numbers.

56 Write a function to find the covariance of two lists of numbers.

57 Write a function to find the correlation coefficient of two lists of numbers.

58 Write a function to fit a linear regression model to a dataset.

59 Write a function to fit a logistic regression model to a dataset.

60 Write a function to perform k-means clustering on a dataset.

61 Write a function to implement the Naive Bayes classification algorithm.

62 Write a function to implement the Support Vector Machine (SVM) classification algorithm.

63 Write a function to implement the Random Forest classification algorithm.

64 Write a function to implement the K-Nearest Neighbors (KNN) classification algorithm.

65 Write a function to implement the Decision Tree classification algorithm.

66 Write a function to implement the Naive Bayes classification algorithm for spam filtering.

67 Write a function to implement the Support Vector Machine (SVM) classification algorithm for sentiment analysis.

68 Write a function to implement the Random Forest classification algorithm for image recognition.

69 Write a function to implement the K-Nearest Neighbors (KNN) classification algorithm for handwriting recognition.

70 Write a function to implement the Decision Tree classification algorithm for medical diagnosis.

71 Define a class to represent a bank account.

72 Define a class to represent a student.

73 Define a class to represent a book.

74 Define a class to represent an employee.

75 Define a class to represent a car.

76 Implement inheritance in a class hierarchy for animals.

77 Implement polymorphism in a class hierarchy for shapes.

78 Implement encapsulation in a class to represent a bank account.

79 Implement abstraction in a class to represent a

80 Implement a stack data structure using Python.

81 Implement a queue data structure using Python.

82 Implement a linked list data structure using

83 Implement a double-linked list data structure using Python.

84 Implement a circular linked list data structure using Python.

85 Implement a binary search tree data structure using Python.

86 Implement an AVL tree data structure using Python.

87 Implement a red-black tree data structure using Python.

88 Implement a hash table data structure using Python.

89 Implement a heap data structure using Python.

90 Implement a graph data structure using Python.

91 Implement a directed graph data structure using Python.

92 Implement a weighted graph data structure using Python.

93 Implement a breadth-first search algorithm for traversing a graph.

94 Implement a depth-first search algorithm for traversing a graph.

95 Implement Dijkstra's algorithm for finding the shortest path in a weighted graph.

96 Implement Kruskal's algorithm for finding the minimum spanning tree of a weighted graph.

97 Implement Prim's algorithm for finding the minimum spanning tree of a weighted graph.

98 Implement a sorting algorithm, such as bubble sort, insertion sort, merge sort, or quick sort.

99 Implement a searching algorithm, such as binary search or linear search.

100 Write a Python program to solve a real-world problem, such as building a simple web scraper, a text summarizer, or a financial data analyzer.

0 Comments:

Post a Comment

Popular Posts

Categories

AI (33) Android (24) AngularJS (1) Assembly Language (2) aws (17) Azure (7) BI (10) book (4) Books (146) C (77) C# (12) C++ (82) Course (67) Coursera (198) Cybersecurity (24) data management (11) Data Science (106) Data Strucures (8) Deep Learning (13) Django (14) Downloads (3) edx (2) Engineering (14) Excel (13) Factorial (1) Finance (6) flask (3) flutter (1) FPL (17) Google (21) Hadoop (3) HTML&CSS (47) IBM (25) IoT (1) IS (25) Java (93) Leet Code (4) Machine Learning (46) Meta (18) MICHIGAN (5) microsoft (4) Nvidia (1) Pandas (3) PHP (20) Projects (29) Python (892) Python Coding Challenge (285) Questions (2) R (70) React (6) Scripting (1) security (3) Selenium Webdriver (2) Software (17) SQL (42) UX Research (1) web application (8)

Followers

Person climbing a staircase. Learn Data Science from Scratch: online program with 21 courses