Python Programming in Hindi

Hello sir i am Saiff

sir my basics is very weak i have complete course

I am class 12th student, how this course can be beneficial for me and what things should i learn apart from Python (i have learned C++ btw)

Hi Learner,
Thank you for reaching out to us. We, at Great Learning Academy, have launched over 100+ free courses with certifications on our website.
You can browse through all our courses here:

sir how to solve this problem

1 Like

plz solve this problem sir

1 Like

Dear Learner,

Please drop a mail to mentioning the course name along with the screenshot.

Hello guys ,I was wondering how I can do sorting in python without sort function?

I am getting a “modulenotfounderror: no module named ‘crypto’” error when i run this line

from Crypto.Cipher import AES

But I successfully installed the crypto module using pip.

I have a csv file without header,so when i import it using panda’s read_csv function,it takes first row of data as header .How can I avoid this?

I can’t undersatnd what are you here sir plz give me briffing how to solve this problem

Use atleast 4 spaces (indentations) before the "def init statement

If the interpreter can’t parse your Python code successfully, then this means that you used invalid syntax somewhere in your code.
The interpreter will attempt to show you where that error occurred.

When you’re learning Python for the first time, it can be frustrating to get a SyntaxError :astonished: :yum:

Syntax errors are usually easy to fix once you figure out what they are. Unfortunately, the error messages are often not helpful. The most common messages are SyntaxError: invalid syntax and SyntaxError: invalid token, neither of which is very informative.

On the other hand, the message does tell you where in the program the problem occurred. Actually, it tells you where Python noticed a problem, which is not necessarily where the error is. Sometimes the error is prior to the location of the error message, often on the preceding line.

If you are building the program incrementally, you should have a good idea about where the error is. It will be in the last line you added.

If you are copying code from a book, start by comparing your code to the book’s code very carefully. Check every character. At the same time, remember that the book might be wrong, so if you see something that looks like a syntax error, it might be.

Here are some ways to avoid the most common syntax errors:

  1. Make sure you are not using a Python keyword for a variable name.
  2. Check that you have a colon at the end of the header of every compound statement, including for, while, if, and def statements.
  3. Check that indentation is consistent. You may indent with either spaces or tabs but it’s best not to mix them. Each level should be nested the same amount.
  4. Make sure that any strings in the code have matching quotation marks.
  5. If you have multiline strings with triple quotes (single or double), make sure you have terminated the string properly. An unterminated string may cause an invalid token error at the end of your program, or it may treat the following part of the program as a string until it comes to the next string. In the second case, it might not produce an error message at all!
  6. An unclosed bracket – (, {, or [ – makes Python continue with the next line as part of the current statement. Generally, an error occurs almost immediately in the next line.
  7. Check for the classic = instead of == inside a conditional.

If nothing works, move on to the next section…

HOPE IT HELPS :innocent:

Sorting is quite simple task that is one of the basic things we learn when learning programming.Here is a code that sorts a list you enter in ascending order.Just see the logic and use it on your own problem

Python Program to Sort List in Ascending Order

NumList = []

Number = int(input("Please enter the Total Number of List Elements: "))
for i in range(1, Number + 1):
value = int(input("Please enter the Value of %d Element : " %i))

for i in range (Number):
for j in range(i + 1, Number):
if(NumList[i] > NumList[j]):
temp = NumList[i]
NumList[i] = NumList[j]
NumList[j] = temp

print("Element After Sorting List in Ascending Order is : ", NumList)

People often install the wrong library.The function you are trying to import is in pycryptodome library.So to import it using pip using this command :

pip install pycryptodome

1 Like

You can simply pass the header parameter with None.For example if you have a csv file named test.csv,here is how to do it:

df = pd.read_csv(‘test.csv’, header=None)

I cannot import a file with read_csv method of pandas.Here is the code and the error i get:

“Python: UnicodeDecodeError: “utf-8” codec can’t decode byte 0xa0 in position 10: invalid start byte”

import pandas as pd

a = pd.read_csv(“filename.csv”)

what is %s and %d in Python and how do i use them?

I am not able to install the speech_recognition module.It shows the error:

ModuleNotFoundError: No module named ‘speech_recognition’ Not able to install speech_recognition in python.