Skip to main content

Learn Python in One Video in Nepali: A Beginner’s Guide

 

Learn Python in One Video in Nepali: A Beginner’s Guide

Python is one of the most popular programming languages today. It's beginner-friendly, versatile, and widely used in various fields, from web development to data science. If you are just starting out with Python and want to learn the basics, this guide is for you. Let’s explore the fundamentals of Python programming, one step at a time, all in one video tutorial, explained in Nepali!


1. Print Statement (प्रिन्ट स्टेटमेन्ट)

In Python, the print statement is used to display output on the screen. This is one of the first things you’ll learn.

python
print("नमस्ते, Python!")

Output:

नमस्ते, Python!

The print() function helps you show any message, numbers, or even the result of calculations.


2. Input Statement (इनपुट स्टेटमेन्ट)

The input statement is used to take input from the user. You can prompt users to type something and store that value in a variable.

python
name = input("तपाईको नाम के हो? ") print("नमस्ते, " + name)

This will ask the user for their name and greet them.


3. Variables (भेरिएबल्स)

Variables are like containers that hold data. You can store different types of values such as numbers, strings, or lists in them.

python
age = 25 name = "Ram" height = 5.8

In Python, you don’t need to specify the data type explicitly. Python will figure it out.


4. Operators (अपरेटरहरू)

Operators in Python allow you to perform operations on variables and values. There are different types of operators:

  • Arithmetic Operators: +, -, *, /

    python
    result = 5 + 3 # Adds two numbers print(result)
  • Comparison Operators: ==, !=, >, <

    python
    print(5 > 3) # True
  • Logical Operators: and, or, not

    python
    print(5 > 3 and 2 < 3) # True

5. Lists (लिस्ट)

Lists are used to store multiple items in a single variable. A list can contain different data types.

python
fruits = ["apple", "banana", "mango"] print(fruits[0]) # Accessing the first item

You can add, remove, and modify items in a list.


6. Dictionary (डिक्सनरी)

A dictionary in Python is a collection of key-value pairs. It’s great for storing related data together.

python
student = {"name": "Sita", "age": 21, "grade": "A"} print(student["name"]) # Accessing value using a key

This allows you to map one set of values to another.


7. Tuples (टपल्स)

Tuples are similar to lists, but they are immutable, meaning you cannot change them after they are created.

python
colors = ("red", "green", "blue") print(colors[1]) # Accessing the second item

Tuples are useful for fixed data that shouldn’t be altered.


8. Sets (सेट)

A set is an unordered collection of unique items. Sets are great for storing data without duplicates.

python
numbers = {1, 2, 3, 3, 4} print(numbers) # Output will be {1, 2, 3, 4}

Sets are also useful for set operations like union, intersection, etc.


9. Conditionals (कन्डिसनल्स)

Conditional statements allow you to execute code based on certain conditions. In Python, you can use if, elif, and else.

python
age = 18 if age >= 18: print("वयस्क") else: print("नाबालिग")

This checks the condition and prints accordingly.


10. Loops (लूप्स)

Loops help in running the same code multiple times. Python supports for and while loops.

  • For Loop: Used to iterate over a sequence.

    python
    for i in range(5): print(i)
  • While Loop: Keeps running until a condition is true.

    python
    count = 0 while count < 5: print(count) count += 1

11. Try Except (त्राई-एक्सेप्ट)

The try and except blocks are used to handle errors in Python. This prevents the program from crashing.

python
try: x = int(input("कुनै संख्या टाइप गर्नुहोस्: ")) print(x) except ValueError: print("संख्या टाइप गर्नुहोस्!")

This handles the case where the user enters something other than a number.


12. File Handling (फाइल ह्यान्डलिङ)

Python allows you to open, read, write, and close files using built-in functions.

python
file = open("data.txt", "w") # Open a file in write mode file.write("This is a sample text.") file.close()

You can also read data from files:

python
file = open("data.txt", "r") content = file.read() print(content) file.close()

Conclusion

Learning Python can be fun and rewarding. Through this blog and the accompanying video tutorial, you’ll have a solid foundation in Python programming in Nepali. Keep practicing these basics, and soon, you’ll be building your own projects in Python!

Comments

Popular posts from this blog

Install TYPESHALA in 64-bit Window | TYPESHALA Download

  Introduction: In the modern era, Typing is the necessary skill which everyone should learn. To learn the English Typing we have many software available to install. But, learning Nepali typing is little bit hard due to the lack of appropriate software to run in our modern windows. Today we are going to talk about how we can install both English and nepali application TYPESHALA which runs in old window, we are going to do some steps in our computer to make it run in our modern windows. TYPESHALA:  Typeshala is the Typing Tutor Software for Windows  that users can learn to type in Nepali and English.  Typeshala   helps to build typing speed, improves the accuracy of typing, and thus makes it more productive. After completing each lesson, it monitors your Typing speed, which is word per minute and precision percentage. Typeshala  provides free hand typing and entertains the user with a small game. Typeshala is most useful for the beginner, who wants to learn  Nepali and English Font  typ

How to remove bloatware from window 10 and 11 | Remove Bloatware of Window in 2024 |

  Introduction:  In the world of operating systems, Windows reigns supreme, powering countless computers worldwide. However, as convenient as it may be, Windows comes pre-loaded with various unnecessary software, known as bloatware. These applications can hog your system resources, slow down performance, and clutter your desktop. But fear not! In this guide, we'll walk you through the steps to declutter your Windows 10 or 11 PC and reclaim its speed and efficiency. Understanding Bloatware: Bloatware refers to the pre-installed software that comes bundled with your operating system. While some of these programs may be useful to some users, many are unnecessary and consume valuable system resources. Common examples include trial versions of antivirus software, manufacturer-specific utilities, and promotional apps. Why Remove Bloatware? Removing bloatware offers several benefits: 1. **Improved Performance**: Bloatware consumes system resources, leading to slower boot times and reduced

Web Development Files Download | Web Development 2024 |

  Web Development Files Download:    Hello Learners! We are learning Web Development from the Code Nepal channel. The Web Development Tutorial for Beginners in Nepali 2024. In this course, every video contains some line of code about Web Development which you need to access to practice. To access the files, you can go through this link to download the file, and Start Coding. Link To Download File: Go through this and download each and every file that you need.               Web Development Tutorial in Nepali files Download: