/python-challenges

Python Projects or challenges

Primary LanguagePython

  • Problem 1 - Enter a number and have the program generate the Fibonacci sequence to that number or to the Nth number. Completed
  • Problem 2 - If a sentance contains every letter in the English alphabet Completed
  • Problem 3 - A string contains only characters '(' and ')' find the length of longest valid parentheses substring. Completed
  • Problem 4 - Given an array of integers, return a new array such that each element at index i of the new array is the product of all the numbers in the original array except the one at i. To-Do
  • Problem 5 - Implement The function accepts two positive integers ‘m’ & ‘n’ as its arguments. You are required to calculate the sum of numbers divisible by both 3 and 5 between the inclusive range of m and n.
  • Problem 6 - The function accepts integers 'dir', 'd1', 's1', 'd2' and 's2' as its argument. 'd1' & 'd2' are the distances and 's1' & 's2' are the speeds of first and second person respectively. Implement the function to find 'time1' and 'time2', which is the time taken by 1st and 2nd person respectively and return relative time as per given conditions : if dir = 0, relative time = time1 + time2 if dir = 1, relative time = time1 - time2 Also, time = distance/speed Assumption : tim1 >= time2 d1, d2, s1, s2 are greater than 0. dir is either 1 or 0.
  • Problem 7 - Implement an algorithm to determine if a string has all unique characters.
  • Problem 8 - The Symmetric Difference (https://www.freecodecamp.org/learn/coding-interview-prep/algorithms/find-the-symmetric-difference)
  • Problem 11 - Define a function that checks if a number is prime or not. (Propel School)
  • Problem 12 - Define a function called "square" which returns the square of a number. (Propel School)
  • Problem 13 - Define another function called "fourth_power" which uses "square" to calculate the fourth power of a number. (Propel School)
  • Problem 14 - Define a function that takes an array as input and prints all values of the array in reverse order. (Propel School)
  • Problem 15 - Define a function that takes a integer 2d array as input and doubles all the elements in the array. (Propel School)
  • Problem 16 - Define a function that takes a sentence as input replaces all the spaces with "-". (Propel School)