Monday, February 17, 2025

List data structure in python


Further commands in list data structure

cars = {'Honda', 'BMW', 'Toyota', 'Audi'}
for d in cars:
    print (d)
cars.append('Suzuki')
cars.insert(3, 'BYD')




 



Tuesday, February 11, 2025

Basics of Python

Escape Characters are used to include special characters in strings.

Examples:

\n : new line

\t : tab

\" or \' or \\ : insert " or ' or \

Comment lines/multiple lines

  • Use #comment for actual comments.

# This is a comment
# This is another commented line
# This is yet another comment

  • Use ''' comment ''' or """ comment """ for multiline.

'''
This is a multiline
that can act as a comment
'''

Comment Multiple Lines in VS Code (Shortcut)
Windows/Linux: Select multiple lines and Press Ctrl + /
Mac: Select multiple lines and Press Cmd + /




Monday, February 10, 2025

Virtual Environment in VS Code

 In Powershell/cmd terminal of VS Code type the following:

  • python -m venv name [ name = name for yoyr vitrual environment]
For activation
  • name\Scripts\activate [(name) will appera before the folder path once the environment is activated]
Install packages in venv
  • pip install package_name [package_name= numpy, pandas, matplotlib]

BALEN - NEPAL HASEKO (LAAJ SHARANAM OST) hits YouTube !!!


"
Ma Nepal Haseko Herna Chahanxu," sung by Balen for the movie Laaj Sharanam, has been released.

Its currently trending at #1 on Trending for music !!

The song was recreated with a music video for the movie Laaj Sharanam. This song was released by Balen Jan 15,2015 on YouTube. The original song didn't had music video. 

Watch on YouTube.

BALEN - NEPAL HASEKO (LAAJ SHARANAM OST) (Lyrics/ Music Compose / Rap : Balen )

BALEN - NEPAL HAASEKO (Original Song)




Wednesday, February 5, 2025

Pythone code to calculate tax for annual salary

  
#define a function 
def tax_salary(salary):
    if salary < 5e5:
        tax= 0.01*5e5
    elif salary <7e5:
        tax = 0.01*5e5 + (salary-5e5)*0.02
    elif salary < 10e5:
        tax =0.01*5e5 + 2e5*0.02+ (salary-7e5)*0.1
    else:
        tax = 0.01*5e5 + 2e5*0.02+ 3e5*0.1+ (salary-10e5)*0.02
    return tax
#Example
salary = 75e4
tax = tax_salary(salary)
print(f'For annual salary of {salary}, the tax is {tax}')

Tuesday, February 4, 2025

Earn Online: Daraz Affiliate Programme

Affiliate marketing is online way of earning by promoting the products and services of other companies and earn certain percentage commission. See details about it here.

Daraz Affiliate Program

Daraz is one of the  Nepal's largest online marketplaces which offers a very wide range of products; fashion, electronics, home appliances and many more. The Daraz affiliate provides commissions ranging from 2% to 10%, depending on the product category. Their program has quality tracking tools to monitor the performance of your affiliate links.

Steps:
1. Log into your Daraz account via mobile app or web.
2. Go to Account> My affiliates
3. Sign up for the Daraz Affiliate Program
4. After signing up you will get list of items with the commission amount.
5. Select the item you want to promote and you will get the link, code and all details to be shared while promoting the product.
6. Include the link in your blog, websites, YouTube channel and other platforms.
7. You can see the performance of your links in the report section of the Daraz Affiliate Program.

The debate of size of Nepalese Army!!

 The recurrent expenditure of the country is rising. As the burden of recurrent expenses and financial management continues to grow, the recently introduced budget for the fiscal year 2081/82 (2024/25) shows that the share of capital expenditure is less than 19%. With time, the demand for larger and more ambitious development projects is increasing, raising concerns about their funding sources. Given that the government’s expected revenue collection barely covers recurrent expenditures, managing the development budget has become a major challenge.

Several efforts have been made to control recurrent expenditure. The government has announced mergers and dissolutions of various governmental bodies at different times, but their implementation has not been effective.

One of the widely discussed topics is the size of the Nepalese Army. There are ongoing discussions and debates at different levels about whether to reduce or increase the number of army personnel. Strong opinions exist on both sides of the argument.

Currently, the Nepalese Army has approximately 98,000 personnel. As a key component of the country’s security system, the army is mostly confined to barracks and is mobilized mainly in emergencies. Despite the continuous challenges regarding border security and disputes, the army has not yet been deployed to the border areas. Additionally, given Nepal’s border disputes with two major neighboring powers, diplomatic efforts should be prioritized over military deployment.


In recent years, the army has been involved in development and construction projects, successfully executing several challenging and complex tasks. Currently, the Nepalese Army is responsible for constructing the Kathmandu-Terai/Madhes Expressway, a national pride project.

Recently, concerns have been raised about the government's increasing social responsibilities, leading to fears that even the basic services and facilities provided to the public might be reduced. To cut administrative costs, the government should merge institutions with similar functions and streamline unnecessarily large public structures to make them more efficient.

The primary role of the Nepalese Army is to maintain peace and security, and the current number of personnel appears relatively large for this purpose. If development projects are to be carried out through the army, questions may arise about the role of other development agencies. Given the current need to increase investment in essential sectors such as education and healthcare, it is reasonable to consider reducing spending on lower-priority areas. Therefore, cutting the number of military personnel and reallocating funds to critical sectors like education and healthcare seems like a logical approach to improving the country’s economy.

Moreover, Nepal’s security system consists of three main forces: the Nepal Police, the Armed Police Force, and the Nepalese Army. The Armed Police Force serves as an intermediary between the Nepal Police and the Nepalese Army in terms of authority and organizational structure. Integrating the Armed Police Force into either the Nepal Police or the Nepalese Army could help balance the state’s administrative burden.