Skip to content

Latest commit

 

History

History
16 lines (15 loc) · 1.33 KB

File metadata and controls

16 lines (15 loc) · 1.33 KB

python-code

Here are some Python programming challenges for practice:

  1. Reverse a String: Write a function to reverse a given string.
  2. Palindrome Check: Write a function to check if a given string is a palindrome.
  3. Anagram Check: Write a function to check if two given strings are anagrams of each other.
  4. Factorial: Write a function to compute the factorial of a given number.
  5. Fibonacci Sequence: Write a function to generate the Fibonacci sequence up to a specified number of terms.
  6. Check Prime: Write a function to check if a given number is prime.
  7. Armstrong Number: Write a function to check if a given number is an Armstrong number.
  8. String Reversal in Place: Write a function to reverse a string in place without using any built-in functions or slicing.
  9. Count Vowels and Consonants: Write a function to count the number of vowels and consonants in a given string.
  10. Binary to Decimal Conversion: Write a function to convert a binary number to its decimal equivalent.
  11. Decimal to Binary Conversion: Write a function to convert a decimal number to its binary equivalent.
  12. Find Missing Number: Given an array containing n distinct numbers taken from 0, 1, 2, ..., n, write a function to find the one missing from the sequence.
  13. Merge Sort: Write a function to implement the merge sort algorithm to sort an array of integers.