Skip to content

gdtdrv/Python-exercises

Repository files navigation

Python-exercises

I am learning OOP via Python and here I have published some of the problems I have solved. Here are the problem descriptions:

Largest Palindrom

Implement a function get_largest_palindrome(n), which return the largest palindrome smaller than n. Given number n can also be palindrome.

Sudoku

Implement a function, called sudoku_solved(sudoku), that checks if the given sudoku matrix is solved correctly.

sudoku is a 9x9 matrix of integers.

A sudoku is solved correctly, if:

  • Each row contains the numbers from 1 do 9 without repeating a number
  • Each column contains the numbers from 1 to 9, without repeating a number
  • All 3x3 subgrids contains the numbers from 1 to 9, without repeating a number

Derivatives

Implement a program that takes a string, representing a polynomial function and returns / prints the derivative of that polynomial function. Example:

f(x) = 2x^3 + 3x + 1

f'(x) = 6x^2 + 3

Queue

Implement a queue without using the append() method.

Linked List

Implement a linked list in python with pop, remove and add_element methods.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages