## Posts

### Energy correlation between Pizza and Diesel

Assume a slice of pizza weighing 100 g has 250 Calories. Correlate its energy content to diesel (calorific value of diesel is 44000 kJ/kg; density of diesel is 0.83 kg L –1 ).   One dietary Calorie, C is equal to 1 kilocalories (kcal).   1 calorie = 4.184 Joules. 1 kg or 1000 g diesel has 44000 kJ = 44000/4.184 ≈ 10516 kcal.   In other words, 10516 kcal are present in 1000 g of diesel.   It is mentioned that, 100 g pizza = 250 kcal (or 250 C). Therefore, 250 kcal are present in (250×1000)/ 10516 = 23.8 g diesel.   Density of diesel = 0.83 kg L –1 = 830 g per 1000 mL.   This means, 830 g diesel occupies 1000 mL volume.    ∴ 23.8 g diesel = (23.8×1000)/830 ≈ 28.7 mL.   Hence, 100 g pizza with 250 Calories ≅ 28.7 mL of diesel.

### NSE live BANK NIFTY option chain data in Excel sheet

A simplified Excel sheet, coded in VBA, to fetch the real-time NSE BANK NIFTY option chain price data with different expiry dates and at different strike prices. Updates for every 1 minute. Optimized to get Last Traded Price (LTP) and Change in Price (%) for Calls and Puts. Automatically updates & fetches the data in real–time for every one minute. Please contact  for errors. Also check the pages for Excel Live Stock Option Chain data and NIFTY. Stock Option Chain:  https://www.enote.page/2022/08/stock-option-chain.html NIFTY Option Chain https://www.enote.page/2021/08/live-option-chain.html

### Capacitors: Calculations & Simulations on Charging, Discharging Time & Voltage

Assume charging a completely discharged capacitor, under resistance, R with an applied potential, E having the capacitance, C. Potential across the capacitor is E c . At time, t = 0s or t o :   E C < E; E C = 0 V. If it is fully charged then E C = E and t = t c . ‘E’ is the maximum potential attained by the capacitor. Time to reach maximum potential is: (t c – t o ).   At any given time, ‘t’ on charging in between t o and t c the potential of the capacitor, E C is related to the maximum potential, E by the relation, where ‘t’ is the elapsed time during charging ‘R’ is the resistance in Ω ‘C’ is the capacitance in F.   The product of R and C is called the time constant and is represented as, τ. So, τ = R × C.   Unit for τ τ = R × C = Ω × {F} = Ω × {C × V –1 } C = Charge in Coulombs = A × s = Ω × {A × s × V –1 } = = Ω × {V × Ω –1 × s × V –1 } = s. At one time constant, capacitor is 63.2% charged. I

### Logical Thinking Puzzles

Blue Fishes There are 200 fishes in a pond. 99% fishes are blue. How many blue fishes should be removed to make the percentage of blue fishes in to 98%? Hint: 2 is not the answer. Answer First, why '2' is not the right answer? If you think 198 is the initial number of blue fishes and if 2 blue fishes are removed, then there will be 196 blue fishes and hence in terms of percentage it is 98. But its wrong, since the total fishes count also decreased to 198, if you just remove 2 blue fishes alone. So the percentage of blue fishes are (196/198) × 100 = 98.99% Its not 98% its almost 99%. In simple, 198 blue fishes and 2 other colored fishes are there initially. And if you remove 100 blue fishes, then 98 blue fishes with 2 other colored fishes. So, the percentage of blue fishes becomes 98. Answer: 100 blue fishes should be removed. Show the Answer Tennis Match Antony and Benjamin played tennis against each other. Its a bet game and

### XRD CUBIC - Simulation of Unit cell dimension, (h, k, l) - Miller indices d-spacing from X-ray diffraction (XRD) angle, 2-theta (For Cubic crystals)

Designed a basic computer program “XRD CUBIC” (coded in Python)  to simulate possible unit crystal cell length (a), Miller indices - {h, k, l} and interplanar spacing (d) for cubic crystals from observed (experimental) X-ray diffraction (XRD) angle that is 2-theta.   It can simulate all these possible crystal lattice parameters for cubic crystal systems such as Simple Cubic or Face Centered Cubic or Body Centered Cubic systems, between the given 2–theta values within the range of specified cell length (a) limits.     1. Enter wavelength of X-ray (in Angstroms) 2. Enter minimum and maximum diffraction angle as 2-theta (in Degrees) 3. Enter minimum and maximum unit cell length (in Angstroms) All the possible cubic crystal parameters as well as diffraction angle with reference to d-spacing between the given Miller indices (h k l planes) will be simulated. Video Tutorial   Designed by: Dr. M Kanagasabapathy, Asst. Professor Departm

### Laptop Battery Life Saver

Coded a lightweight program (600 KB), 'Battery Life Saver' to extend the life span of laptop batteries. Using a Laptop Battery continuously by overcharging above 90% or by below 15%, reduces its life span.   This light-weight .exe program, Battery Life Saver will alarm, on excess charging or discharging.   Set the desired Battery Limit Percentage using the slider, say 50% and allow the Battery Life Saver to give alarm. It automatically detects, charging and battery status. Screenshots DOWNLOAD Download the Python codes for this program, from this page.   Python code for Laptop Battery Life Saver     Author Dr. M Kanagasabapathy Asst. Professor, Department of Chemistry Rajus’ College, Madurai Kamaraj University Rajapalayam (Tamil Nadu) India 626117

### Google Sheet to check the consistent growth of a stock for 52 weeks

Designed a Google sheet-based analysis to check, whether the growth of a stock is consistent or not in the past one year. It calculates and averages the return of every previous, 7 days' close price for the past 1 year, from yesterday’s date and closing price. So it's possible to check whether the growth is consistent for the past 52 weeks instead of conventional one-year return calculation, which is based on initial and final dates of a year. In simple, it estimates an average of weekly returns (for the consequent previous 52 weeks from yesterday) and compares it with conventional yearly return (%). Screenshot Link to Google sheet

### INVESTOCK – Simple Python computer programing code to fetch & back test NSE historical (15+ years) stock price data

F et ch hist orical price data and back test between any two dates of NSE Stocks using this simple Python code and import them in .CSV file and predict the winning percentage. Step 1. Install NSEPY Open Command Prompt (in Windows 10) as Administrator. Then paste the following commands (shown in red ) one after another. C:\Python\python.exe -m pip install --upgrade pip Wait to upgrade... pip install nsepy Wait to upgrade... pip install nsepy –upgrade Wait to upgrade... Screenshot for installation in Windows 10 OS. Step 2. Fetching the price data Now open Python IDLE and paste the following code. Save it with a suitable filename, with an extension '.py'. Stock symbols and Date Enter the equity code as in NSE, India. Example: “TCS”) Enter starting and closing date digits, in the format, “yyyy,mm,dd” Example: “7-Aug-2021” is entered as: “2021,8,7") Change Symbol and starting as well as closing date in the required format. The data will be saved as .CSV file. Code Copy and past

### How to calculate Area under Curve & FWHM using the computer program Origin?

Area under a curve can be estimated by integration method. (Check the references for more details.) Full width at half maximum (FWHM) for a curve is used in many scientific data analyses.  For instance, in X–ray diffraction (XRD) analysis of crystal data, it is used to find grain size.   It can be easily calculated using, quadratic equation. (Check the references for more details.) This tutorial shows how to use the computer program Origin to estimate both ' Area under a Curve ' as well as ' FWHM '. Check these eNotes for  references 1.  Full Width at Half Maximum (FWHM) & Quadratic equation 2. Introduction to Quadratic equation 3.  Area under curve by integration method

### JavaScript Codes: Math - Trigonometric Functions

Input : Sine JavaScript & HTML code for SINE function Input : Sine JavaScript - Trigonometric Functions Calculator Input:        (Values in degree) sin : cos : tan : csc : sec : cot : asin : acos : atan : sinh : cosh : tanh : csch : sech : coth : asinh: acosh: atanh:

### Electronic Circuit Simulator - Free tool to analyze electronic circuits

Free electronic circuit simulator to study and analyze electronic circuits. It has a good user interface and has a sizable number of circuit components. Its very useful tool for educational purposes and to analyze basic circuits to complicated circuits. Download Links  Windows       Linux   Mac (If not downloaded, o pen the link in New tab and enter.)   Direct download link for Windows

### VESTA for Linux Mint (Debian file)

Linux Mint is one of the best operating system with a good GUI, open-sourced and can be installed on old PCs also. And VESTA is a computer package to analyze crystal structures & geometry, X-ray diffraction simulation (XRD), and to investigate Miller indices {h k l} data for crystal systems,  space groups of crystalline materials etc.  It is a 3D visualization program for structural models, volumetric data such as electron/nuclear densities, and crystal morphologies. it also deals with multiple structural models, volumetric data, and crystal morphologies in the same window. But its Debian version for Linux Mint operating system is not available for direct download.  You can download the VESTA.deb for Linux Mint from here.

### Interpretation of open interest (OI) & price change of a stock

Based on open interest & price change data of a stock, the price trend of the stock is correlated as: Price Open Interest Price trend Increase Increase Increase (More buyers & long build-up) Increase Decrease Increase (Short positions covering)  Decrease Increase Decrease (More short positions build-up)  Decrease Decrease Decrease ( Long unwinding Buyers become sellers)