Python Virtual Training For Arcesium - Module I - Day 5

Sep 13-17, 2021 Vikrant Patil

These notes are available online at https://notes.pipal.in/2021/arcesium_finop_batch1/module1-day5.html

© Pipal Academy LLP

Day 1 | Day 2 | Day 3 | Day 4 | Day 5

We will be using jupyter hub from https://lab.pipal.in for this training.

login to hub and create a notebook with name module1-day5

     urls = ['www.abrakadabra.com/dccEcB/EGdd',
    'www.abrakadabra.com/gADFeD/bcAF',
    'www.abra.com/AGadbb/eagE',
    'www.dabra.com/cffdfD/FCAD',
    'www.abra.com/GFGaBE/dcfc',
    'www.abra.com/gaFegG/Bdaf',
    'www.abrakadabra.com/aGabaf/EEfa',
    'www.dabra.com/ceEgFD/bGgc',
    'www.dabra.com/bDEffC/bcEA']
>>> min2(3, 4)
3
>>> min3(4, 2, 6)
2
3, 5, 12, 7, 3, 2, 11, 10

min    next comparison
3       there is nothing compare for first element
3       5
3       12
3       7
3       3
3       2
2       11
2       10
2

Modules and Scripts

with functions we commbined multiple statements together , gave it name. recalled it with function call

+ /home/vikrant
  + trainings
  + programming
  + Pictures
  +
  somefile.txt
  hello.py

complete path of hello.py is /home/vikrant/hello.py

os.path.isdir("/home/vikrant/hello.py") -> False

problem

Writing your own modules

Python scripts

a program that can be run from command line.

python3 hello.py
Hello World!

How to run commands from jupyter...

!python3 hello.py

Command line arguments

How to pass command line arguments from command line?