Skip to content

Sonal10/Basics_of_Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Basics of Python

What is this repository about? This repository contains some simple python programs extending functionality of classes, list comprehensions, functions etc.

  1. breaktimer.py - Opens youtube, plays your favourite videos in your breaks. This programs interacts with web browser.
  2. decorators.py,decorator_example.py - Shows how to use decorators
  3. even_or_odd.py - Checks if a number is even or odd. Shows use of fucntion & classes.
  4. fib_series.py - Implements fibonnaci series & shows use of fucntion & classes.
  5. fizzbuzz.py - Check if a number is divisible by 3, 5 or both.
  6. list_comprehensions.py, generators.py - Uses list comprehension
  7. iterations.py - Iterating through dictionary
  8. mindstorms.py - Draws shapes on the screen
  9. profanity_alert.py - Check if words are profane or not, alert if it is. Uses functions.
  10. rename.py - Renames files in folders
  11. send_messages.py - Uses twillio package to send messages to phone
  12. object_oriented.py - Implements object oriented concepts
  13. simple_calculator.py - Implements calculator functions using object oriented concepts

For running the code, you may follow the below steps:

  1. Run VSCode (or any other code editor) from Anaconda Command Prompt
  2. Make sure you are using a dedicated virtual environment and activate it, sample -

'''code conda create -n myenv python=3.7.3 '''

  1. Install or upgrade all packages from requirements.txt

conda install --file requirements.txt or pip install -r requirements.txt

You may need to add the full path of requirements.txt file depending on your pwd

Important links:

  1. Conda environment - https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html
  2. https://wiki.epfl.ch/help-git-en/how-can-i-import-an-existing-folder-into-my-repository