/python-scripts

Python coding practice.

Primary LanguagePython

Python Coding

  • Python programs for practicing.
  • Python fundamentals.

Code and Resources Used

Python Version: 3.7
Packages: random, numpy, math, pandas, datetime, matplotlib

Content

  • Variables
  • Functions
  • Lambda
  • OOP
  • Objects and classes
  • Recursion
  • Iteration

randomwalks

2Drandomwalks

Made a program that calculates the seconds you have already lived. Today: November 26, 2021 I've already lived 957.80M seconds. Could you guess my date of birth?

Recursion is never the best answer: example of low efficency recursion. A program comparing recursion vs iteration with Fibonacci sequence.

Pascal's triangle is a triangular array of the binomial coefficients that arises in probability theory, combinatorics and algebra. I made a program that returns the value found in the chosen row and column of a Pascal triangle.

I created a recursive function that returns the width and length of sheet A(N) based on the ISO216.

I developed a simulation that models the work of an airport control tower.

Sorting algorithms

Compared different sorting algorithms:

Based on number of comparissons made

sortingalgo_listlength

Based on execution time

sortingalgo_time

Based on list complexity

sortingalgo_time