Director at UniDev Global PTY LTD

A Basic Python main()

In some python scripts, you may see a function definition and a conditional statement that looks like the example below: In this code, there is a function called main() that prints the phrase “Hello World!” when the Python interpreter executes it. There is also a conditional (or if) statement that checks the value of __name__…

Regular Expressions Based on Syntax Used by Perl

Symbol(s) Meaning Example Example Matches * Matches the preceding character, subexpression, or bracketed character, 0 or more times a*b* aaaaaaaa, aaaaabbbb, bbbbbbb + Matches the preceding character, subexpression, or bracketed character, 1 or more times a+b+ aaaaaab, aaaabbbbb, abbbbbbb [] Matches any character within the brackets (i.e., “Pick any one of these things”) [A-Z]* APPLE,…

Painting Question

In order to estimate the cost of painting a house, a painter needs to know the surface area of the exterior. Develop an algorithm for computing that value. Your inputs are the width, length, and height of the house, the number of windows and doors, and their dimensions. (Assume the windows and doors have a…

Bank Account Question

Write an algorithm to settle the following question: A bank account starts out with $10,000. Interest is compounded monthly at 0.5 per cent per month. Every month, $500 is withdrawn to meet college expenses. After how many years is the account depleted? State the current bank statement total is $10,000 State the monthly rate is…

Create a virtual environment for a Python project

A virtual environment is created on top of an existing Python installation, known as the virtual environment’s “base” Python. It may optionally be isolated from the packages in the base environment, so only those explicitly installed in the virtual environment are available. A virtual environment is Running this command creates the target directory Command to…

Binance Terminologies

Market Data Endpoints These endpoints provide real-time and historical market data for different cryptocurrencies traded on Binance. This data includes information such as the current price, trading volume, order book depth, and more. Account Endpoints These endpoints allow developers to access information about their Binance account, including balances, trade history, and open orders. They also…

How to get remote from Yahoo Finance

According to the “datareader” official site, to access the remote Yahoo Finance Data, it is suggested to use the following code: These codes will pop up an error message: “TypeError: string indices must be integers”. Here is a solution to help you to get the Yahoo Finance remote data. At first, install yfinance by Then,…