Python Classroom Series – 25/Jul/2021

Command line applications in Python using Argparse

  • Understanding positional arguments
ping google.com
cp 1.txt 2.txt
  • Introduction optional arguments
ping -c 4 google.com
cp -r src/ test/
  • Refer Here for the basic example

  • Exercise: Create a python program to accept prinicipal amount, rate of intrest and time period in years and display the simple and compount intrest to the user

interestcalculator.py -p 10000 -r 10 -t 3

Preview

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

About learningthoughtsadmin